Skip to content

Commit

Permalink
remove interactive auth test (#1741)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilgreenbird authored Jan 29, 2022
1 parent c9dae1f commit 468a35a
Showing 1 changed file with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -824,27 +824,4 @@ public void testInvalidAuthentication() throws SQLException {
e.getMessage().startsWith("The authentication value") && e.getMessage().endsWith("is not valid."));
}
}

@Test
public void testInteractiveAuthTimeout() throws SQLException {
try {
SQLServerDataSource ds = new SQLServerDataSource();
ds.setServerName(azureServer);
ds.setUser(badUserName);
ds.setDatabaseName(azureDatabase);
ds.setAuthentication("ActiveDirectoryInteractive");
ds.setLoginTimeout(1);
ds.setEncrypt(false);
ds.setTrustServerCertificate(true);
try (Connection connection = ds.getConnection()) {}
fail(EXPECTED_EXCEPTION_NOT_THROWN);
} catch (Exception e) {
if (!(e instanceof SQLServerException)) {
fail(EXPECTED_EXCEPTION_NOT_THROWN);
}
assertTrue(INVALID_EXCEPTION_MSG + ": " + e.getMessage() + "," + e.getCause(),
e.getMessage().contains(ERR_MSG_FAILED_AUTHENTICATE + " the user " + badUserName
+ " in Active Directory (Authentication=ActiveDirectoryInteractive)."));
}
}
}

0 comments on commit 468a35a

Please sign in to comment.