lh0156 opened a new pull request, #23047: URL: https://github.com/apache/kafka/pull/23047
Closes KAFKA-19677 ### Summary - Close every `SmokeTestClient` that has not reached the closed state during `@AfterEach` cleanup, including clients in the `ERROR` state. - Clear the client list after cleanup so a failed parameterized invocation cannot retain stale client references. - Add a focused regression test for the error-state cleanup invariant. `SmokeTestDriverIntegrationTest` runs multiple parameterized scenarios and rotates clients while the driver is active. Previously, cleanup skipped clients that reported `error()`, leaving their `KafkaStreams` resources open until the process exited. The next scenario could then start with resources from the failed scenario still alive. Cleanup now uses the lifecycle state that determines whether a close is still needed: any client that is not closed is closed before the cluster is stopped. ### Tests - `./gradlew :streams:integration-tests:test --tests org.apache.kafka.streams.integration.SmokeTestDriverCleanupTest --no-build-cache --console=plain` - `./gradlew :streams:integration-tests:test --tests org.apache.kafka.streams.integration.SmokeTestDriverIntegrationTest --no-build-cache --rerun-tasks --console=plain` - `./gradlew :streams:integration-tests:spotlessCheck --no-build-cache --console=plain` The cleanup regression test was verified to fail before the fix because `close()` was not called for an errored client, then pass after the fix. Both `SmokeTestDriverIntegrationTest` parameterizations pass after the change. -- 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]
