Skip to content

Commit

Permalink
Oracle proxy authentication test fix (#2143)
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 af60e4e commit 53511fd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -277,7 +277,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 @@ -337,7 +337,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 53511fd

Please sign in to comment.