You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2012/06/29 17:43:40 UTC

svn commit: r1355449 - /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java

Author: kwall
Date: Fri Jun 29 15:43:38 2012
New Revision: 1355449

URL: http://svn.apache.org/viewvc?rev=1355449&view=rev
Log:
QPID-4099: Fix race condition in test FailoverBehaviourTest.testFlowControlFlagResetOnFailover

Modified:
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java?rev=1355449&r1=1355448&r2=1355449&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java Fri Jun 29 15:43:38 2012
@@ -894,7 +894,10 @@ public class FailoverBehaviourTest exten
             }
 
             assertTrue("Flow is not blocked", ((AMQSession<?, ?>) producerSession).isFlowBlocked());
-            assertEquals("Unexpected number of sent messages", 4, counter.get());
+            // Message counter could be 3 or 4 depending on the progression of producing thread relative
+            // to the receipt of the ChannelFlow.
+            final int currentCounter = counter.get();
+            assertTrue("Unexpected number of sent messages", currentCounter == 3 || currentCounter == 4);
 
             killBroker();
             startBroker();



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org