From 8bae0f5463c06f469194694aefcd2c0ce6c9d6e7 Mon Sep 17 00:00:00 2001 From: ChangYu Huang Date: Mon, 24 Nov 2025 17:49:46 -0500 Subject: [PATCH 1/2] Add commit sync after each verification --- .../kafka/server/FetchFromFollowerIntegrationTest.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/test/scala/integration/kafka/server/FetchFromFollowerIntegrationTest.scala b/core/src/test/scala/integration/kafka/server/FetchFromFollowerIntegrationTest.scala index e50a6a96bc56a..06ba2132e0348 100644 --- a/core/src/test/scala/integration/kafka/server/FetchFromFollowerIntegrationTest.scala +++ b/core/src/test/scala/integration/kafka/server/FetchFromFollowerIntegrationTest.scala @@ -27,9 +27,9 @@ import org.apache.kafka.common.serialization.ByteArrayDeserializer import org.apache.kafka.coordinator.group.GroupCoordinatorConfig import org.apache.kafka.server.config.ServerLogConfigs import org.junit.jupiter.api.Assertions.{assertEquals, assertTrue} -import org.junit.jupiter.api.{Disabled, Timeout} +import org.junit.jupiter.api.Timeout import org.junit.jupiter.params.ParameterizedTest -import org.junit.jupiter.params.provider.MethodSource +import org.junit.jupiter.params.provider.{MethodSource, ValueSource} import java.util import java.util.Properties @@ -181,9 +181,8 @@ class FetchFromFollowerIntegrationTest extends BaseFetchRequestTest { } } - @Disabled @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedGroupProtocolNames) - @MethodSource(Array("getTestGroupProtocolParametersAll")) + @ValueSource(strings = Array("classic")) def testRackAwareRangeAssignor(groupProtocol: String): Unit = { val partitionList = brokers.indices.toList @@ -235,6 +234,7 @@ class FetchFromFollowerIntegrationTest extends BaseFetchRequestTest { val records = future.get(30, TimeUnit.SECONDS) assertEquals(assignments(i), records.map(r => new TopicPartition(r.topic, r.partition)).toSet) } + consumers.foreach{ consumer => consumer.commitSync() } } From fabfa62d0f4ea6c9609dcab49023f0ff4f368884 Mon Sep 17 00:00:00 2001 From: ChangYu Huang Date: Mon, 24 Nov 2025 18:54:00 -0500 Subject: [PATCH 2/2] Simplify --- .../kafka/server/FetchFromFollowerIntegrationTest.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/test/scala/integration/kafka/server/FetchFromFollowerIntegrationTest.scala b/core/src/test/scala/integration/kafka/server/FetchFromFollowerIntegrationTest.scala index 06ba2132e0348..b3b7dccd4a3b7 100644 --- a/core/src/test/scala/integration/kafka/server/FetchFromFollowerIntegrationTest.scala +++ b/core/src/test/scala/integration/kafka/server/FetchFromFollowerIntegrationTest.scala @@ -234,7 +234,7 @@ class FetchFromFollowerIntegrationTest extends BaseFetchRequestTest { val records = future.get(30, TimeUnit.SECONDS) assertEquals(assignments(i), records.map(r => new TopicPartition(r.topic, r.partition)).toSet) } - consumers.foreach{ consumer => consumer.commitSync() } + consumers.foreach{ _.commitSync() } }