Skip to content

Commit

Permalink
Updated testDSPooledConnectionAccessTokenCallbackClassExceptions test…
Browse files Browse the repository at this point in the history
… case.
  • Loading branch information
Ananya2 authored Nov 28, 2024
1 parent 1358f94 commit df589e1
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,17 @@ 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");
ds.setPassword(UUID.randomUUID().toString());
SQLServerPooledConnection pc;


pc = (SQLServerPooledConnection) ds.getPooledConnection();
try (Connection conn1 = pc.getConnection()) {
assertNotNull(conn1);
}

// Should fail with invalid accessTokenCallbackClass value
ds.setAccessTokenCallbackClass("Invalid");
ds.setUser("");
Expand Down

0 comments on commit df589e1

Please sign in to comment.