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-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to