aliehsaeedii commented on code in PR #20320:
URL: https://github.com/apache/kafka/pull/20320#discussion_r2382125619


##########
tools/src/test/java/org/apache/kafka/tools/streams/DescribeStreamsGroupTest.java:
##########
@@ -252,10 +255,17 @@ public void testDescribeNonExistingStreamsGroup() {
     }
 
     @Test
-    public void testDescribeStreamsGroupWithShortTimeout() {
+    public void testDescribeStreamsGroupWithShortTimeout() throws Exception {
+        cluster.createTopic(INPUT_TOPIC_2, 1, 1);
+        KafkaStreams streams2 = new KafkaStreams(topology(INPUT_TOPIC_2, 
OUTPUT_TOPIC_2), streamsProp(APP_ID_2));
+        startApplicationAndWaitUntilRunning(streams2);
+
         List<String> args = List.of("--bootstrap-server", bootstrapServers, 
"--describe", "--members", "--verbose", "--group", APP_ID, "--timeout", "1");
         Throwable e = assertThrows(ExecutionException.class, () -> 
getStreamsGroupService(args.toArray(new String[0])).describeGroups());
         assertEquals(TimeoutException.class, e.getCause().getClass());
+
+        streams2.close();
+        streams2.cleanUp();

Review Comment:
   I think the `try-with-resource`, expects the resource to be defined in the 
try clause.



-- 
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]

Reply via email to