You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KAFKA-18952 Fix flaky test in MonitorableSinkIntegrationTest (#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.
Reviewers: Chia-Ping Tsai <[email protected]>
0 commit comments