summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2012-02-04 15:19:36 +0000
committerRobert Gemmell <robbie@apache.org>2012-02-04 15:19:36 +0000
commitca5e23306286a8cfb33a7dfc4b69eb98c2d91dfe (patch)
treec46c0d15b9ba4e415564baaeef82d6f2ae9c1977
parentd37044526746a8d4e29ec9c448e9fbff7d11f94b (diff)
downloadqpid-python-ca5e23306286a8cfb33a7dfc4b69eb98c2d91dfe.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@1240517 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/queue/SortedQueueTest.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/SortedQueueTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/SortedQueueTest.java
index 8269487a8e..49511b1245 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/SortedQueueTest.java
+++ b/qpid/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));