summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2010-01-15 19:37:08 +0000
committerMartin Ritchie <ritchiem@apache.org>2010-01-15 19:37:08 +0000
commit5db40cb7fb0b687f10f25bb05f7eafbeb0ba2089 (patch)
tree62cc00c8797914f65d159ea585136415aaf8c285 /java
parent8e1f647a10024492e09a689e61128eb5f42c561e (diff)
downloadqpid-python-5db40cb7fb0b687f10f25bb05f7eafbeb0ba2089.tar.gz
QPID-1662 : Added logged to TimeToLiveTest. This showed that the second message was not recieved and so the third was non-null and caused the test failure.
Adjusting the timeout for msgs 1 and 2 to 5s helped ensure that they were correctly received. I've left the logging in so that we can see what the results of the three receives were even if it fails on one of the asserts. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@899782 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/queue/TimeToLiveTest.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/server/queue/TimeToLiveTest.java b/java/systests/src/main/java/org/apache/qpid/server/queue/TimeToLiveTest.java
index 5970d105eb..428368f859 100644
--- a/java/systests/src/main/java/org/apache/qpid/server/queue/TimeToLiveTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/server/queue/TimeToLiveTest.java
@@ -124,10 +124,16 @@ public class TimeToLiveTest extends QpidTestCase
clientConnection.start();
//Receive Message 0
- Message receivedFirst = consumer.receive(1000);
- Message receivedSecond = consumer.receive(1000);
+ // Set 5s receive time for messages we expect to receive.
+ Message receivedFirst = consumer.receive(5000);
+ Message receivedSecond = consumer.receive(5000);
Message receivedThird = consumer.receive(1000);
+ // Log the messages to help diagnosis incase of failure
+ _logger.info("First:"+receivedFirst);
+ _logger.info("Second:"+receivedSecond);
+ _logger.info("Third:"+receivedThird);
+
// Only first and last messages sent should survive expiry
Assert.assertNull("More messages received", receivedThird);