chia7712 commented on a change in pull request #8657:
URL: https://github.com/apache/kafka/pull/8657#discussion_r439920019



##########
File path: 
core/src/test/scala/unit/kafka/coordinator/group/GroupCoordinatorTest.scala
##########
@@ -536,6 +537,11 @@ class GroupCoordinatorTest {
     // Make sure the NewMemberTimeout is not still in effect, and the member 
is not kicked
     assertEquals(1, group.size)
 
+    // prepare the mock replica manager again since the delayed join is going 
to complete
+    EasyMock.reset(replicaManager)
+    
EasyMock.expect(replicaManager.getMagic(EasyMock.anyObject())).andReturn(Some(RecordBatch.MAGIC_VALUE_V1)).anyTimes()

Review comment:
       ```GroupMetadataManager#storeGroup``` 
(https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/coordinator/group/GroupMetadataManager.scala#L245)
 also call ```ReplicaManager.getMagic```.
   
   There are delayed ops are completed by ```timer.advanceClock``` so we have 
to mock the ```replicaManager.getMagic```. the mock is same to 
https://github.com/apache/kafka/blob/trunk/core/src/test/scala/unit/kafka/coordinator/group/GroupCoordinatorTest.scala#L3823.
  




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