Skip to content

Commit

Permalink
Oracle proxy authentication test fix (#2145)
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 <radek.felcman@oracle.com>
  • Loading branch information
rfelcman committed May 16, 2024
1 parent 7d06f20 commit 271766d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,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 @@ -357,7 +357,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 271766d

Please sign in to comment.