lucasbru commented on code in PR #17721:
URL: https://github.com/apache/kafka/pull/17721#discussion_r1863351962


##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/InternalTopicIntegrationTest.java:
##########
@@ -73,32 +77,39 @@
 @Timeout(600)
 @Tag("integration")
 public class InternalTopicIntegrationTest {
-    public static final EmbeddedKafkaCluster CLUSTER = new 
EmbeddedKafkaCluster(1);
+
+    public static EmbeddedKafkaCluster cluster = null;
 
     @BeforeAll
     public static void startCluster() throws IOException, InterruptedException 
{
-        CLUSTER.start();
-        CLUSTER.createTopics(DEFAULT_INPUT_TOPIC, DEFAULT_INPUT_TABLE_TOPIC);
+
+        final Properties props = new Properties();
+        
props.setProperty(GroupCoordinatorConfig.GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG,
 "classic,consumer,streams");
+        props.setProperty(ServerConfigs.UNSTABLE_API_VERSIONS_ENABLE_CONFIG, 
"true");
+
+        cluster = new EmbeddedKafkaCluster(1, props);

Review Comment:
   We need to pass those props into it. I guess we could do it with a `static 
{` block, but I like this more. We should also not make it final to do a 
`cluster = null` in @AfterAll, otherwise the cluster will stay in memory for 
the rest of the test suite, IIUC. Is there any magic in JUnit that unloads test 
classes after they have been run? As far as I know, there is not. So if we have 
to use static variables in test classes, we should clear them out in @AfterAll.



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

Reply via email to