ijuma commented on code in PR #18267:
URL: https://github.com/apache/kafka/pull/18267#discussion_r1894681488
##########
core/src/test/scala/unit/kafka/coordinator/group/GroupMetadataManagerTest.scala:
##########
@@ -1982,25 +1982,8 @@ class GroupMetadataManagerTest {
// expire all of the offsets
time.sleep(4)
- // expect the offset tombstone
- val recordsCapture: ArgumentCaptor[MemoryRecords] =
ArgumentCaptor.forClass(classOf[MemoryRecords])
-
- when(partition.appendRecordsToLeader(recordsCapture.capture(),
- origin = ArgumentMatchers.eq(AppendOrigin.COORDINATOR), requiredAcks =
anyInt(),
- any(), any())).thenReturn(LogAppendInfo.UNKNOWN_LOG_APPEND_INFO)
groupMetadataManager.cleanupGroupMetadata()
- // verify the tombstones are correct and only for the expired offsets
- val records = recordsCapture.getValue.records.asScala.toList
- assertEquals(2, records.size)
- records.foreach { message =>
- assertTrue(message.hasKey)
- assertFalse(message.hasValue)
- val offsetKey =
GroupMetadataManager.readMessageKey(message.key).asInstanceOf[OffsetKey]
- assertEquals(groupId, offsetKey.key.group)
- assertEquals("foo", offsetKey.key.topicPartition.topic)
- }
Review Comment:
I added back this code and made the test pass by returning the right
partition from replica manager.
--
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]