From 6f6755cf6c2f9920ccb60e48e2297c7f1da68139 Mon Sep 17 00:00:00 2001 From: Stepan Burlakov Date: Mon, 11 Nov 2024 12:05:53 +0200 Subject: [PATCH] add simple validate test --- .../java/integration/tests/ConnectionTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/integrationTest/java/integration/tests/ConnectionTest.java b/src/integrationTest/java/integration/tests/ConnectionTest.java index 41cd3304..d2f4178a 100644 --- a/src/integrationTest/java/integration/tests/ConnectionTest.java +++ b/src/integrationTest/java/integration/tests/ConnectionTest.java @@ -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);