liuliuOD opened a new pull request, #23527: URL: https://github.com/apache/kafka/pull/23527
The Streams integration test suite reuses a single embedded Kafka cluster, and the auto reset tests use the same Kafka Streams application ID: `testAutoOffsetId`. When a test finishes without explicitly leaving the consumer group, its consumer may remain registered until `session.timeout.ms` expires. The following test then has to wait for the stale member to be removed before the group can rebalance. This caused `shouldResetByDuration` to __*spend approximately 44 seconds waiting with low CPU utilization.*__ Close the KafkaStreams instance with `LEAVE_GROUP` so the broker removes the member immediately and the next test can rebalance without waiting for the session timeout. ### Tests: - Ran `shouldResetByDuration` with one worker and one test fork. - Verified the narrowed 11-test range: the target test, the five tests before it, and the five tests after it in the serial execution order. - This range was selected because running `shouldResetByDuration` alone does not reproduce the delay; the surrounding tests preserve the shared cluster and consumer-group lifecycle that exposes the stale-member condition. - All 11 tests passed. - Reduced `shouldResetByDuration` __*from approximately 46 seconds to approximately 3 seconds.*__ -- 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]
