You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ri...@apache.org on 2010/02/02 13:13:25 UTC

svn commit: r905600 - /qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java

Author: ritchiem
Date: Tue Feb  2 12:13:23 2010
New Revision: 905600

URL: http://svn.apache.org/viewvc?rev=905600&view=rev
Log:
QPID-2059 : Updated test to try and wait for the subscriber message to appear in the log file.

Modified:
    qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java

Modified: qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java?rev=905600&r1=905599&r2=905600&view=diff
==============================================================================
--- qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java (original)
+++ qpid/branches/0.5.x-dev/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java Tue Feb  2 12:13:23 2010
@@ -125,11 +125,15 @@
     {
         _session.createDurableSubscriber(_topic, getName());
 
-        //Validate
+        //Wait for up to 2 seconds for message to appear
+        // ignore response as we will use the findMatches afterwards just
+        // incase it did take more than 2 seconds to log.
+        _monitor.waitForMessage(SUB_PREFIX, 2000);
 
+        //Validate
         List<String> results = _monitor.findMatches(SUB_PREFIX);
 
-        assertEquals("Result set larger than expected.", 1, results.size());
+        assertEquals("Result set not as expected.", 1, results.size());
 
         String log = getLog(results.get(0));
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org