From a1ed8bdb627c85e2870ab6273320a441fc717378 Mon Sep 17 00:00:00 2001 From: sullis Date: Mon, 26 Feb 2024 08:02:56 -0800 Subject: [PATCH] close JDBC connections (#12494) --- .../integration/tests/OfflineClusterIntegrationTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java index edcf831265db..d58712b3087b 100644 --- a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java +++ b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/OfflineClusterIntegrationTest.java @@ -3195,12 +3195,16 @@ public void testJDBCClient() ResultSet resultSet = statement.executeQuery(query); resultSet.first(); Assert.assertTrue(resultSet.getLong(1) > 0); + connection.close(); + Assert.assertTrue(connection.isClosed()); connection = getJDBCConnectionFromBrokers(RANDOM.nextInt(), getRandomBrokerPort()); statement = connection.createStatement(); resultSet = statement.executeQuery(query); resultSet.first(); Assert.assertTrue(resultSet.getLong(1) > 0); + connection.close(); + Assert.assertTrue(connection.isClosed()); } private java.sql.Connection getJDBCConnectionFromController(int controllerPort)