diff options
| author | Keith Wall <kwall@apache.org> | 2014-06-03 22:13:59 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2014-06-03 22:13:59 +0000 |
| commit | 61bd69531da409a8c1550bbc67b59a222175b23f (patch) | |
| tree | 47d827d47527b30d3a44f36dcc8319ba5f6f3e87 /qpid/java/systests/src | |
| parent | f3599d8e82635c80242e2c7b6047f2e20d4b9735 (diff) | |
| download | qpid-python-61bd69531da409a8c1550bbc67b59a222175b23f.tar.gz | |
QPID-5798: [Java Broker Tests] Intermittent failure of FailoverBehaviourTest due to race condition within test
Work by Andrew MacBean <andymacbean@gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1599809 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/systests/src')
| -rw-r--r-- | qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java | 7 |
1 files changed, 6 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 8822fc5373..0c6a14070f 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 @@ -18,6 +18,7 @@ */ package org.apache.qpid.client.failover; +import org.apache.qpid.AMQException; import org.apache.qpid.client.AMQConnection; import org.apache.qpid.client.AMQConnectionFactory; import org.apache.qpid.client.AMQDestination; @@ -1347,7 +1348,7 @@ public class FailoverBehaviourTest extends FailoverBaseCase implements Connectio * @return queue browser * @throws JMSException */ - private QueueBrowser prepareQueueBrowser(int acknowledgeMode) throws JMSException + private QueueBrowser prepareQueueBrowser(int acknowledgeMode) throws JMSException, AMQException { init(acknowledgeMode, false); _consumer.close(); @@ -1358,6 +1359,10 @@ public class FailoverBehaviourTest extends FailoverBaseCase implements Connectio { _producerSession.commit(); } + else + { + ((AMQSession)_producerSession).sync(); + } QueueBrowser browser = _consumerSession.createBrowser((Queue) _destination); return browser; |
