qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1627472 - /qpid/trunk/qpid/java/systests/src/test/java/org/apache/qpid/systest/management/jmx/ConnectionManagementTest.java
Date Thu, 25 Sep 2014 07:39:24 GMT
Author: kwall
Date: Thu Sep 25 07:39:24 2014
New Revision: 1627472

URL: http://svn.apache.org/r1627472
Log:
NO-JIRA: [Java Broker Tests] Fix for occasionally failing ConnectionManagementTest on 0-10
path

Modified:
    qpid/trunk/qpid/java/systests/src/test/java/org/apache/qpid/systest/management/jmx/ConnectionManagementTest.java

Modified: qpid/trunk/qpid/java/systests/src/test/java/org/apache/qpid/systest/management/jmx/ConnectionManagementTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/test/java/org/apache/qpid/systest/management/jmx/ConnectionManagementTest.java?rev=1627472&r1=1627471&r2=1627472&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/test/java/org/apache/qpid/systest/management/jmx/ConnectionManagementTest.java
(original)
+++ qpid/trunk/qpid/java/systests/src/test/java/org/apache/qpid/systest/management/jmx/ConnectionManagementTest.java
Thu Sep 25 07:39:24 2014
@@ -82,6 +82,16 @@ public class ConnectionManagementTest ex
         assertEquals("Expected one managed connection", 1, getManagedConnections().size());
 
         _connection.close();
+
+        // On the 0-10 path, the connection close ok is sent *before* the model is updated,
so we need poll
+        // to reliable detect the state change.
+        int counter = 0;
+        while(getManagedConnections().size() > 0 && counter < 50)
+        {
+            sleep();
+            counter++;
+        }
+
         assertEquals("Expected no managed connections after client connection closed", 0,
getManagedConnections().size());
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message