Skip to content

Commit

Permalink
Oracle proxy authentication test fix (#2142)
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 788c8b6 commit 326d665
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().contains("ORA-00942: table or view does not exist")){
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().contains("ORA-00942: table or view does not exist")){
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 326d665

Please sign in to comment.