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

   Refer to https://github.com/apache/kafka/pull/20082#discussion_r2639707507.
   
   Refactored the test to fix a race condition caused by dynamic Mockito 
stubbing during test execution.
   
   The previous implementation used `doReturn(false)` and `reset()` on a spy 
object while a background thread was running, causing a `ClassCastException`.
   
   This patch replaces that logic with a thread-safe `AtomicBoolean` and 
`doAnswer` approach to toggle the mock's behavior safely.


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