activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-6 git commit: fix race in test
Date Wed, 28 Jan 2015 19:11:46 GMT
Repository: activemq-6
Updated Branches:
  refs/heads/master 90b8b35b5 -> c6a444fe5


fix race in test


Project: http://git-wip-us.apache.org/repos/asf/activemq-6/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-6/commit/d895988f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-6/tree/d895988f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-6/diff/d895988f

Branch: refs/heads/master
Commit: d895988faf267aa39fe5b37312bd2cbdaa8168f3
Parents: 90b8b35
Author: jbertram <jbertram@redhat.com>
Authored: Tue Jan 27 13:29:05 2015 -0600
Committer: jbertram <jbertram@redhat.com>
Committed: Tue Jan 27 15:40:15 2015 -0600

----------------------------------------------------------------------
 .../jms/server/management/JMSServerControlTest.java          | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-6/blob/d895988f/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlTest.java
index d36492f..0dd1900 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControlTest.java
@@ -562,6 +562,14 @@ public class JMSServerControlTest extends ManagementTestBase
 
          Assert.assertNull(fakeJMSStorageManager.destinationMap.get(queueName));
 
+         long timeout = System.currentTimeMillis() + 1000;
+         while (timeout > System.currentTimeMillis() && !((ActiveMQMessageConsumer)cons).isClosed())
+         {
+            Thread.sleep(1);
+         }
+
+         Assert.assertTrue(((ActiveMQMessageConsumer)cons).isClosed());
+
          try
          {
             cons.receive(5000);


Mime
View raw message