From cb659f6a253cc6e0313c658ba40aa39fd81b1005 Mon Sep 17 00:00:00 2001 From: chiacyu Date: Mon, 17 Jun 2024 21:41:57 +0800 Subject: [PATCH 1/2] Add clean() in front part of function --- .../org/apache/kafka/clients/consumer/KafkaConsumerTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java b/clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java index cfe4d03e6a84b..3b698c74aaa04 100644 --- a/clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java +++ b/clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java @@ -3197,6 +3197,7 @@ private void prepareJoinGroupAndVerifyReason( @ParameterizedTest @EnumSource(value = GroupProtocol.class, names = "CLASSIC") public void configurableObjectsShouldSeeGeneratedClientId(GroupProtocol groupProtocol) { + CLIENT_IDS.clear(); Properties props = new Properties(); props.put(ConsumerConfig.GROUP_PROTOCOL_CONFIG, groupProtocol.name()); props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9999"); From b715e3e4cfaecf5d0d9a0901d4eec389236c85a4 Mon Sep 17 00:00:00 2001 From: chiacyu Date: Mon, 17 Jun 2024 23:03:58 +0800 Subject: [PATCH 2/2] Removed the names from EnumSource --- .../org/apache/kafka/clients/consumer/KafkaConsumerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java b/clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java index 3b698c74aaa04..e1351e392eaed 100644 --- a/clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java +++ b/clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java @@ -3195,7 +3195,7 @@ private void prepareJoinGroupAndVerifyReason( // TODO: this test triggers a bug with the CONSUMER group protocol implementation. // The bug will be investigated and fixed so this test can use both group protocols. @ParameterizedTest - @EnumSource(value = GroupProtocol.class, names = "CLASSIC") + @EnumSource(value = GroupProtocol.class) public void configurableObjectsShouldSeeGeneratedClientId(GroupProtocol groupProtocol) { CLIENT_IDS.clear(); Properties props = new Properties();