mjsax commented on code in PR #19669: URL: https://github.com/apache/kafka/pull/19669#discussion_r2093828163
########## clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java: ########## @@ -1959,17 +1963,19 @@ public void testCloseShouldBeIdempotent(GroupProtocol groupProtocol) { consumer = newConsumer(groupProtocol, time, client, subscription, metadata, assignor, false, groupInstanceId); - consumer.close(Duration.ZERO); - consumer.close(Duration.ZERO); + consumer.close(CloseOptions.timeout(Duration.ZERO)); + consumer.close(CloseOptions.timeout(Duration.ZERO)); // verify that the call is idempotent by checking that the network client is only closed once. verify(client).close(); } + @SuppressWarnings("resource") Review Comment: That's the original code... For this case, IntelliJ complains about an unused variable. Given that we "need" to suppress some warning, I thought it's better to make this change, as we don't really create a new `Consumer` and thus the updated code is "closer" to what the test does? -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org