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

jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/main by this push:
     new 27c17441d6 Fix flaky XACompletionTest by adding wait for async states 
(#1862)
27c17441d6 is described below

commit 27c17441d681e2b325e5e0700220a7b0d302e780
Author: gurpartap3697 <[email protected]>
AuthorDate: Thu Apr 2 13:49:50 2026 +0530

    Fix flaky XACompletionTest by adding wait for async states (#1862)
    
    * Fix flaky XACompletionTest by adding wait for async states
    
    * add async wait for getQueueSize
---
 .../src/test/java/org/apache/activemq/store/jdbc/XACompletionTest.java   | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/XACompletionTest.java
 
b/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/XACompletionTest.java
index 26e5784087..9c58494471 100644
--- 
a/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/XACompletionTest.java
+++ 
b/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/XACompletionTest.java
@@ -249,6 +249,7 @@ public class XACompletionTest extends TestSupport {
         resource.recover(XAResource.TMSTARTRSCAN);
         resource.recover(XAResource.TMNOFLAGS);
 
+        assertTrue("Timed out waiting for queue state to stabilize", 
Wait.waitFor(() -> proxy.getInFlightCount() == 0L && proxy.getQueueSize() == 
10L && proxy.cursorSize() == 0));
         assertEquals("prefetch 0", 0, proxy.getInFlightCount());
         assertEquals("size 0", 10, proxy.getQueueSize());
         assertEquals("size 0", 0, proxy.cursorSize());


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to