Skip to content

Commit

Permalink
add simple validate test
Browse files Browse the repository at this point in the history
  • Loading branch information
stepansergeevitch committed Nov 11, 2024
1 parent 04a821d commit 6f6755c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/integrationTest/java/integration/tests/ConnectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@ void validatesOnSystemEngineIfParameterProvided() throws SQLException {

}


@Test
void validateConnection() throws SQLException {
ConnectionInfo params = integration.ConnectionInfo.getInstance();
String url = getJdbcUrl(params, true, true);
try (Connection connection = DriverManager.getConnection(url, params.getPrincipal(), params.getSecret())) {
assertTrue(connection.isValid(500));
}
}

void unsuccessfulConnect(boolean useDatabase, boolean useEngine) throws SQLException {
ConnectionInfo params = integration.ConnectionInfo.getInstance();
String url = getJdbcUrl(params, useDatabase, useEngine);
Expand Down

0 comments on commit 6f6755c

Please sign in to comment.