Skip to content

Commit

Permalink
Oracle proxy authentication test fix (#2144)
Browse files Browse the repository at this point in the history
Remove too strong dependency on Oracle error message. There is change between Oracle 23c and Oracle 23ai.

Signed-off-by: Radek Felcman <[email protected]>
  • Loading branch information
rfelcman authored May 16, 2024
1 parent 525f6cf commit b5bf922
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public void testCreateWithOutProxy() throws Exception{
empId = employee.getId();
commitTransaction(em);
} catch (Exception ex) {
if (ex.getMessage().indexOf("ORA-00942: table or view does not exist") == -1){
if (!(ex.getMessage().contains("java.sql.SQLSyntaxErrorException") && ex.getMessage().contains("ORA-00942"))) {
ex.printStackTrace();
fail("it's not the right exception");
}
Expand Down Expand Up @@ -363,7 +363,7 @@ public void testFlushRollback() throws Exception{
em.persist(employee);
em.flush();
} catch (Exception ex) {
if (ex.getMessage().indexOf("ORA-00942: table or view does not exist") == -1){
if (!(ex.getMessage().contains("java.sql.SQLSyntaxErrorException") && ex.getMessage().contains("ORA-00942"))) {
ex.printStackTrace();
fail("it's not the right exception");
}
Expand Down

0 comments on commit b5bf922

Please sign in to comment.