The GitHub Actions job "Flink Connector Kafka CI" on flink-connector-kafka.git/fix-flaky-dynamic-source-enumerator-test has failed. Run started by GitHub user slachiewicz (triggered by slachiewicz).
Head commit for run: 5df47434903043908e1a3b01d3e8966b61e138c8 / Sylwester Lachiewicz <[email protected]> [FLINK-40136][Connectors/Kafka] Fix flaky ConcurrentModificationException in DynamicKafkaSourceEnumeratorTest hasLatestMetadataUpdateEvent() polls getLatestMetadataUpdateEventWithoutContextSync() while the enumerator's metadata discovery thread appends events via sendEventToSourceReader() on the main executor thread. In MockSplitEnumeratorContext, sentSourceEvent's inner List<SourceEvent> instances are shared and can be appended to concurrently while the polling loop streams them (FLINK-40543), which intermittently throws ConcurrentModificationException. Catch ConcurrentModificationException alongside AssertionError in hasLatestMetadataUpdateEvent() so the existing CommonTestUtils.waitUtil(...) polling loop retries instead of failing the test. Retain reflection in getLatestMetadataUpdateEventWithoutContextSync() because calling the public MockSplitEnumeratorContext#getSentSourceEvent() dispatches to workerExecutor and calls Future#get(); in tests that intentionally block workerExecutor (such as testProductionMetadataRefreshBypassesBlockedSourceCoordinatorAsyncCallable), calling getSentSourceEvent() causes a thread deadlock. Generated-by: Claude Fable 5 Report URL: https://github.com/apache/flink-connector-kafka/actions/runs/34343656216 With regards, GitHub Actions via GitBox
