majialoong opened a new pull request, #21057: URL: https://github.com/apache/kafka/pull/21057
The test `testMonitorableSinkConnectorAndTask` is flaky due to a race condition between the task thread and the test thread. The `awaitRecords()` method uses a `CountDownLatch` that counts down in `TestableSinkTask.put()` for each record inside the loop, while `MonitorableSinkTask.count` is updated after `super.put()` returns. When the latch reaches zero, `awaitRecords()` returns immediately, but the `count += records.size() `may not have executed yet. -- 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]
