IgnacioAcunaF commented on a change in pull request #10858:
URL: https://github.com/apache/kafka/pull/10858#discussion_r651772882



##########
File path: core/src/test/scala/unit/kafka/admin/ConsumerGroupServiceTest.scala
##########
@@ -106,7 +106,8 @@ class ConsumerGroupServiceTest {
   }
 
   private def listGroupOffsetsResult: ListConsumerGroupOffsetsResult = {
-    val offsets = topicPartitions.map(_ -> new 
OffsetAndMetadata(100)).toMap.asJava
+    // Half of the partitions of the testing topics are set to have a negative 
integer offset (null value [KAFKA-9507 for reference])
+    val offsets = topicPartitions.zipWithIndex.map{ case (tp, i) => tp -> ( 
if(i % 2 == 0) null else new OffsetAndMetadata(100) ) }.toMap.asJava

Review comment:
       Yes of course. Makes sense to keep tests isolated to avoid possible 
conflicts on the future. Will do that.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to