This is an automated email from the ASF dual-hosted git repository.

zixuan 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 6d9576461e8 [fix][test] Use AtomicBoolean.compareAndSet() to guarantee 
atomicity in testDoIndividualBatchAckNeverAffectIsDuplicate() method (#25217)
6d9576461e8 is described below

commit 6d9576461e83278d0a354b1913eb744211fcea76
Author: Oneby Wang <[email protected]>
AuthorDate: Fri Feb 6 11:43:47 2026 +0800

    [fix][test] Use AtomicBoolean.compareAndSet() to guarantee atomicity in 
testDoIndividualBatchAckNeverAffectIsDuplicate() method (#25217)
---
 .../apache/pulsar/client/impl/AcknowledgementsGroupingTrackerTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/pulsar-client/src/test/java/org/apache/pulsar/client/impl/AcknowledgementsGroupingTrackerTest.java
 
b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/AcknowledgementsGroupingTrackerTest.java
index 1f46f9da3a4..0b91d86064c 100644
--- 
a/pulsar-client/src/test/java/org/apache/pulsar/client/impl/AcknowledgementsGroupingTrackerTest.java
+++ 
b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/AcknowledgementsGroupingTrackerTest.java
@@ -437,7 +437,7 @@ public class AcknowledgementsGroupingTrackerTest {
             Thread isDuplicateThread = new Thread(() -> {
                 for (int j = 0; j < loops; j++) {
                     boolean duplicate = tracker.isDuplicate(batchMessageId1);
-                    assertResult.set(assertResult.get() || duplicate);
+                    assertResult.compareAndSet(false, duplicate);
                 }
             }, "isDuplicate-thread-" + i);
             isDuplicateThread.start();

Reply via email to