xijiu opened a new pull request, #17789: URL: https://github.com/apache/kafka/pull/17789
First of all, the reason for the failure of this test is due to TIMEOUT, the method `AbstractConsumerTest#validateGroupAssignment` timeout after waiting for 10 seconds. And it reproduced on my computer. `AbstractConsumerTest#validateGroupAssignment` is used to check all the consumer's assignments meet expectations, the exception as below: ``` org.opentest4j.AssertionFailedError: Did not get valid assignment for partitions HashSet(topic1-2, topic1-4, topic-1, topic-0, topic1-5, topic1-1, topic1-0, topic1-3). Instead, got ArrayBuffer(Set(topic1-1, topic1-0, topic1-2), Set(topic1-5, topic1-4), Set()) ``` I ran this junit test many times on my local computer after I added some logs. Then I found the timeout case is the GroupProtocol.CONSUMER mode. The CONSUMER mode maybe interact with the GroupCoordinator multiple times before reconciliation completed  The frequency of interaction is controlled by configuration `group.consumer.heartbeat.interval.ms` which default value is 5000ms. Those successful unit tests take at least 5 seconds to complete, so maybe we can reduce heartbeat interval. After I set `group.consumer.heartbeat.interval.ms` to 1000ms, this problem has not occurred again on my computer. And running this unit test has become more faster.  -- 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]
