slachiewicz opened a new pull request, #285:
URL: https://github.com/apache/flink-connector-kafka/pull/285

   
   hasLatestMetadataUpdateEvent() polls 
getLatestMetadataUpdateEventWithoutContextSync(), which reads 
MockSplitEnumeratorContext's internal sentSourceEvent list via reflection 
directly from the JUnit test thread, bypassing the context's single-threaded 
main executor. The enumerator's metadata discovery thread appends to that same 
list via sendEventToSourceReader() (correctly serialized through the main 
executor), so a test thread iterating the list via Stream.reduce() while that 
thread appends to it occasionally throws ConcurrentModificationException 
instead of the intended AssertionError "not ready yet" signal.
   
   Catch ConcurrentModificationException alongside AssertionError so the 
existing CommonTestUtils.waitUtil(...) polling loop retries instead of failing 
the test.


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