This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 7d35d7cd36d [fix][test] Fix flaky
SingleThreadNonConcurrentFixedRateSchedulerTest.testPeriodicTaskCancellation
(#24823)
7d35d7cd36d is described below
commit 7d35d7cd36ddb692a66bb3441c0cdd2aae0c5f10
Author: Philipp Dolif <[email protected]>
AuthorDate: Tue Oct 7 06:09:23 2025 +0200
[fix][test] Fix flaky
SingleThreadNonConcurrentFixedRateSchedulerTest.testPeriodicTaskCancellation
(#24823)
---
.../common/util/SingleThreadNonConcurrentFixedRateSchedulerTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/pulsar-common/src/test/java/org/apache/pulsar/common/util/SingleThreadNonConcurrentFixedRateSchedulerTest.java
b/pulsar-common/src/test/java/org/apache/pulsar/common/util/SingleThreadNonConcurrentFixedRateSchedulerTest.java
index 78ceffb79c4..9e00cf61dcc 100644
---
a/pulsar-common/src/test/java/org/apache/pulsar/common/util/SingleThreadNonConcurrentFixedRateSchedulerTest.java
+++
b/pulsar-common/src/test/java/org/apache/pulsar/common/util/SingleThreadNonConcurrentFixedRateSchedulerTest.java
@@ -477,9 +477,9 @@ public class
SingleThreadNonConcurrentFixedRateSchedulerTest {
assertTrue(cancelled);
assertTrue(future.isCancelled());
- // Wait and verify no more executions
+ // Wait and verify no more executions (allowing one execution that was
in progress during cancellation)
Thread.sleep(200);
- assertEquals(executionCount.get(), countBeforeCancel);
+ assertTrue(executionCount.get() - countBeforeCancel <= 1);
}
@Test