summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2012-06-29 15:43:38 +0000
committerKeith Wall <kwall@apache.org>2012-06-29 15:43:38 +0000
commit9b2699d8a9b257e17d26495d19590f61d06c05c7 (patch)
treed98c7b32c00becdb05aa4bf473127a6631a0d006 /qpid/java
parentb72879b0f51e41e4945ff2332f790f23b74708ce (diff)
downloadqpid-python-9b2699d8a9b257e17d26495d19590f61d06c05c7.tar.gz
QPID-4099: Fix race condition in test FailoverBehaviourTest.testFlowControlFlagResetOnFailover
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1355449 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java
index cb13ad0f1c..4b766864b4 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java
+++ b/qpid/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();