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: 2046a4f2164b1111e6d3acc24ca47c0b240b84b4 / Sylwester Lachiewicz <[email protected]> [FLINK-40136] Fix flaky ConcurrentModificationException in DynamicKafkaSourceEnumeratorTest Switch getLatestMetadataUpdateEventWithoutContextSync() from accessing sentSourceEvent via reflection to the public getSentSourceEvent() accessor on MockSplitEnumeratorContext. hasLatestMetadataUpdateEvent() polls getLatestMetadataUpdateEventWithoutContextSync() while the enumerator's metadata discovery thread appends events via sendEventToSourceReader() on the main executor thread. In MockSplitEnumeratorContext, getSentSourceEvent() performs a shallow copy on the worker executor while the writer runs on the main executor; the inner List<SourceEvent> instances are shared and can be appended to concurrently while the polling loop streams them (FLINK-40543). This can cause ConcurrentModificationException directly during list iteration or wrapped in ExecutionException during the worker executor's map copy. Catch ConcurrentModificationException (and unwrap it from ExecutionException) alongside AssertionError in hasLatestMetadataUpdateEvent() so the existing CommonTestUtils.waitUtil(...) polling loop retries instead of failing the test. Co-Authored-By: Claude Sonnet 5 <[email protected]> Report URL: https://github.com/apache/flink-connector-kafka/actions/runs/33749050730 With regards, GitHub Actions via GitBox
