diff --git a/src/test/java/com/microsoft/sqlserver/jdbc/fedauth/PooledConnectionTest.java b/src/test/java/com/microsoft/sqlserver/jdbc/fedauth/PooledConnectionTest.java index a7bf0f8c4..dee9f7b17 100644 --- a/src/test/java/com/microsoft/sqlserver/jdbc/fedauth/PooledConnectionTest.java +++ b/src/test/java/com/microsoft/sqlserver/jdbc/fedauth/PooledConnectionTest.java @@ -435,29 +435,8 @@ public void testDSPooledConnectionAccessTokenCallbackClassExceptions() throws Ex // User/password is not required for access token callback AbstractTest.updateDataSource(accessTokenCallbackConnectionString, ds); - ds.setAccessTokenCallbackClass(AccessTokenCallbackClass.class.getName()); - ds.setUser("user"); SQLServerPooledConnection pc; - - // Should fail with user set - try { - pc = (SQLServerPooledConnection) ds.getPooledConnection(); - fail(TestResource.getResource("R_expectedFailPassed")); - } catch (SQLServerException e) { - assertTrue(e.getMessage().matches(TestUtils.formatErrorMsg("R_AccessTokenCallbackWithUserPassword"))); - } - - ds.setUser(""); - ds.setPassword(UUID.randomUUID().toString()); - - // Should fail with password set - try { - pc = (SQLServerPooledConnection) ds.getPooledConnection(); - fail(TestResource.getResource("R_expectedFailPassed")); - } catch (SQLServerException e) { - assertTrue(e.getMessage().matches(TestUtils.formatErrorMsg("R_AccessTokenCallbackWithUserPassword"))); - } - + // Should fail with invalid accessTokenCallbackClass value ds.setAccessTokenCallbackClass("Invalid"); ds.setUser("");