Skip to content

Commit e87d689

Browse files
committed
add async wait for getQueueSize
1 parent 41e29c8 commit e87d689

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/XACompletionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public void testStatsAndBrowseAfterAckPreparedRolledback() throws Exception {
249249
resource.recover(XAResource.TMSTARTRSCAN);
250250
resource.recover(XAResource.TMNOFLAGS);
251251

252-
Wait.waitFor(() -> proxy.getInFlightCount() == 0L && proxy.cursorSize() == 0);
252+
assertTrue("Timed out waiting for queue state to stabilize", Wait.waitFor(() -> proxy.getInFlightCount() == 0L && proxy.getQueueSize() == 10 && proxy.cursorSize() == 0));
253253
assertEquals("prefetch 0", 0, proxy.getInFlightCount());
254254
assertEquals("size 0", 10, proxy.getQueueSize());
255255
assertEquals("size 0", 0, proxy.cursorSize());

0 commit comments

Comments
 (0)