diff options
| author | Keith Wall <kwall@apache.org> | 2012-06-29 15:43:38 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2012-06-29 15:43:38 +0000 |
| commit | 26ff62e3ea7fab3f5a416dab72f647e1d3f90d6c (patch) | |
| tree | 8c722443541ab91ece04425451eb27309d0f0bae | |
| parent | 5fc93969c4cee62d4c9d96817dec8115dfbf78c8 (diff) | |
| download | qpid-python-26ff62e3ea7fab3f5a416dab72f647e1d3f90d6c.tar.gz | |
QPID-4099: Fix race condition in test FailoverBehaviourTest.testFlowControlFlagResetOnFailover
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1355449 13f79535-47bb-0310-9956-ffa450edef68
| -rw-r--r-- | java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java b/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java index cb13ad0f1c..4b766864b4 100644 --- a/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java +++ b/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java @@ -894,7 +894,10 @@ public class FailoverBehaviourTest extends FailoverBaseCase implements Connectio } 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(); |
