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

   ## Summary
   
   Tests that create `BrokerTopicStats` without closing it leave metrics in the 
shared Yammer registry. Running `DumpLogSegmentsTest` before `JmxToolTest` in 
the same JVM causes `InstanceAlreadyExistsException` for `MessagesInPerSec`.
   
   Close stats through test lifecycle hooks or try-with-resources, and update 
`LogTestUtils.createLogManager` to accept caller-owned stats.
   
   ## Testing
   
   - Confirmed the failure before the fix using a fixed test class order.
   - Verified the same reproduction passes after the fix.
   - All 245 tests across the nine targeted test classes pass.
   - Checkstyle, Spotless, and `git diff --check` pass.


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