guozhangwang commented on a change in pull request #8445:
URL: https://github.com/apache/kafka/pull/8445#discussion_r414027883



##########
File path: 
clients/src/test/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinatorTest.java
##########
@@ -466,24 +477,193 @@ public void 
testSyncGroupRequestWithFencedInstanceIdException() {
     }
 
     @Test
-    public void testHeartbeatUnknownMemberResponseDuringRebalancing() throws 
InterruptedException {
+    public void testJoinGroupUnknownMemberResponseWithOldGeneration() throws 
InterruptedException {
         setupCoordinator();
-        mockClient.prepareResponse(groupCoordinatorResponse(node, 
Errors.NONE));
+        joinGroup();
 
-        final int generation = 1;
+        final AbstractCoordinator.Generation currGen = 
coordinator.generation();
 
-        mockClient.prepareResponse(joinGroupFollowerResponse(generation, 
memberId, JoinGroupRequest.UNKNOWN_MEMBER_ID, Errors.NONE));
-        mockClient.prepareResponse(syncGroupResponse(Errors.NONE));
+        RequestFuture<ByteBuffer> future = coordinator.sendJoinGroupRequest();
 
-        coordinator.ensureActiveGroup();
+        TestUtils.waitForCondition(() -> !mockClient.requests().isEmpty(), 
2000,
+            "The join-group request was not sent in time after");

Review comment:
       Ack.




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