diff options
| author | Robert Gemmell <robbie@apache.org> | 2012-02-04 15:19:36 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2012-02-04 15:19:36 +0000 |
| commit | a3aac339eddc41f3a23085f4df2c752b7c1c681e (patch) | |
| tree | d46cb67d7ec21dde72a2e7a98a33abaec5fbe9bd /java/systests/src | |
| parent | 8446ae8618a3866f7a1265ab6e9a44801673fb18 (diff) | |
| download | qpid-python-a3aac339eddc41f3a23085f4df2c752b7c1c681e.tar.gz | |
QPID-3803: allow more time on persistent runs to help prevent sporadic failures on sorted queue tests
Applied patch from Oleksandr Rudyy <orudyy@gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1240517 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests/src')
| -rw-r--r-- | java/systests/src/main/java/org/apache/qpid/server/queue/SortedQueueTest.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/server/queue/SortedQueueTest.java b/java/systests/src/main/java/org/apache/qpid/server/queue/SortedQueueTest.java index 8269487a8e..49511b1245 100644 --- a/java/systests/src/main/java/org/apache/qpid/server/queue/SortedQueueTest.java +++ b/java/systests/src/main/java/org/apache/qpid/server/queue/SortedQueueTest.java @@ -143,7 +143,7 @@ public class SortedQueueTest extends QpidBrokerTestCase { try { - consumerThread.join(5000L); + consumerThread.join(getConsumerThreadJoinInterval()); } catch(InterruptedException e) { @@ -156,6 +156,11 @@ public class SortedQueueTest extends QpidBrokerTestCase producer.close(); } + private long getConsumerThreadJoinInterval() + { + return isBrokerStorePersistent() ? 50000L: 5000L; + } + public void testSortedQueueWithAscendingSortedKeys() throws JMSException, NamingException, AMQException { final Queue queue = createQueue(); @@ -177,7 +182,7 @@ public class SortedQueueTest extends QpidBrokerTestCase { try { - consumerThread.join(5000L); + consumerThread.join(getConsumerThreadJoinInterval()); } catch(InterruptedException e) { @@ -212,7 +217,8 @@ public class SortedQueueTest extends QpidBrokerTestCase TextMessage received = null; int messageCount = 0; - while((received = (TextMessage) consumer.receive(1000)) != null) + long receiveInterval = isBrokerStorePersistent() ? 3000l : 1000l; + while((received = (TextMessage) consumer.receive(receiveInterval)) != null) { assertEquals("Received message with unexpected sorted key value", "samesortkeyvalue", received.getStringProperty(TEST_SORT_KEY)); |
