Author: ritchiem
Date: Fri Jan 15 19:37:08 2010
New Revision: 899782

URL: http://svn.apache.org/viewvc?rev=899782&view=rev
Log:
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.


Modified:
    
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/TimeToLiveTest.java

Modified: 
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/TimeToLiveTest.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/TimeToLiveTest.java?rev=899782&r1=899781&r2=899782&view=diff
==============================================================================
--- 
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/TimeToLiveTest.java
 (original)
+++ 
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/TimeToLiveTest.java
 Fri Jan 15 19:37:08 2010
@@ -124,10 +124,16 @@
         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); 
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to