FrankChen021 commented on code in PR #19816:
URL: https://github.com/apache/druid/pull/19816#discussion_r3686773091
##########
sql/src/test/java/org/apache/druid/sql/avatica/DruidAvaticaHandlerTest.java:
##########
@@ -1051,21 +1055,28 @@ public void testNotTooManyStatementsWhenClosed()
public void testAutoReconnectOnNoSuchConnection() throws SQLException
{
for (int i = 0; i < 50; i++) {
- final ResultSet resultSet =
client.createStatement().executeQuery("SELECT COUNT(*) AS cnt FROM druid.foo");
- Assert.assertEquals(
- ImmutableList.of(ImmutableMap.of("cnt", 6L)),
- getRows(resultSet)
- );
+ try (Statement statement = client.createStatement()) {
Review Comment:
Addressed in a4619616f0 by declaring the try-with-resources Statement
variable final, consistent with Druid style and the neighboring resource
declarations.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]