merlimat opened a new pull request, #25426: URL: https://github.com/apache/pulsar/pull/25426
## Motivation Fix flaky test `testMsgDropStat` in `NonPersistentTopicTest`. The test had two separate Awaitility loops: one to trigger publisher drops and another to verify drop rates via stats. This was inherently racy because `Rate.calculateRate()` calls `countAdder.sumThenReset()`, which destructively resets the drop counters. When the second loop retried after a counter reset, it would see 0 drops even though drops had occurred. ## Modifications Combined both Awaitility loops into a single loop that: 1. Sends fresh concurrent bursts (using CyclicBarrier for simultaneous sends) 2. Calls `updateRates()` and checks all drop rates in the same iteration This ensures each `updateRates()` call sees freshly-accumulated drops rather than stale (reset) counters. ## Documentation - [x] `doc-not-needed` ## Matching PR in forked repository _No response_ -- 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]
