From 53511fdbd883151a8554f199e3e4e8a9852177f9 Mon Sep 17 00:00:00 2001 From: Radek Felcman Date: Thu, 16 May 2024 13:50:40 +0200 Subject: [PATCH] Oracle proxy authentication test fix (#2143) Remove too strong dependency on Oracle error message. There is change between Oracle 23c and Oracle 23ai. Signed-off-by: Radek Felcman --- .../ProxyAuthenticationServerTestSuite.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/jpa/proxyauthentication/ProxyAuthenticationServerTestSuite.java b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/jpa/proxyauthentication/ProxyAuthenticationServerTestSuite.java index f86664e654f..19f692195e2 100644 --- a/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/jpa/proxyauthentication/ProxyAuthenticationServerTestSuite.java +++ b/foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/jpa/proxyauthentication/ProxyAuthenticationServerTestSuite.java @@ -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 @@ -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"); } @@ -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"); }