lh0156 opened a new pull request, #23041:
URL: https://github.com/apache/kafka/pull/23041

   ### Summary
   
   The client metrics cache eviction tests use a 300 ms preemptive timeout and 
a fixed 50 ms polling sleep while the SystemTimerReaper executes expiration 
tasks asynchronously. Under normal CI scheduling, the test can time out even 
though the timer task is progressing.
   
   This change replaces the timing-sensitive loop with a shared wait helper 
based on Kafka's TestUtils.waitForCondition. The helper waits until both the 
timer queue and the expected client instances are drained, preserving the 
existing post-eviction metric and connection-map assertions.
   
   ### Tests
   
   - `./gradlew :server:test --tests 
org.apache.kafka.server.ClientMetricsManagerTest`
   - `./gradlew :server:spotlessCheck :server:checkstyleTest`
   - `git diff --check`
   
   Jira: https://issues.apache.org/jira/browse/KAFKA-16499


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

Reply via email to