Skip to content

Commit

Permalink
close JDBC connections (apache#12494)
Browse files Browse the repository at this point in the history
  • Loading branch information
sullis authored Feb 26, 2024
1 parent dcbaca1 commit a1ed8bd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a1ed8bd

Please sign in to comment.