liuliuOD opened a new pull request, #23564: URL: https://github.com/apache/kafka/pull/23564
Some Kafka Streams integration tests closed and immediately restarted a Streams instance with the same application ID. With the default shutdown behavior, the consumer could remain in the group until `session.timeout.ms` expired, causing unnecessary waiting before the next instance could start or continue the test scenario. This change explicitly uses `LEAVE_GROUP` for clean shutdown paths followed by state deletion, restoration, offset manipulation, or application restart. Final teardown paths remain unchanged when group membership removal is not required. Test time (JUnit XML execution time, excluding Gradle build and compilation): | Case | Before | After | |---|---:|---:| | `LagFetchIntegrationTest` | 56.571s | 12.830s | | `RestoreIntegrationTest` | 232.285s | 141.425s | | `SelfManagedOffsetLifecycleIntegrationTest` | 102.714s | 51.617s | | `SlidingWindowedKStreamIntegrationTest` | 504.080s | 62.447s | | Total targeted scope (81 tests) | 16m04.97s | 5m41.29s | Test-only change. No production code, public APIs, test inputs, or assertions are affected. -- 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]
