You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/09/06 14:35:59 UTC
[1/2] activemq-artemis git commit: Fix test race condition
Repository: activemq-artemis
Updated Branches:
refs/heads/master 3869d4935 -> 111945a2d
Fix test race condition
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/4bece407
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/4bece407
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/4bece407
Branch: refs/heads/master
Commit: 4bece40706052b9a279037f92211610bdba4ec8d
Parents: 3869d49
Author: jbertram <jb...@apache.com>
Authored: Fri Sep 2 14:49:40 2016 -0500
Committer: jbertram <jb...@apache.com>
Committed: Tue Sep 6 09:26:59 2016 -0500
----------------------------------------------------------------------
.../artemis/tests/integration/stomp/StompTest.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4bece407/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java
index 9e25c18..1c92f42 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java
@@ -39,12 +39,15 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
import org.apache.activemq.artemis.api.core.client.ServerLocator;
import org.apache.activemq.artemis.api.core.management.ResourceNames;
import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.artemis.core.postoffice.impl.LocalQueueBinding;
import org.apache.activemq.artemis.core.protocol.stomp.Stomp;
+import org.apache.activemq.artemis.core.server.Queue;
import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
import org.apache.activemq.artemis.logs.AssertionLoggerHandler;
import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
import org.apache.activemq.artemis.tests.integration.mqtt.imported.FuseMQTTClientProvider;
import org.apache.activemq.artemis.tests.integration.mqtt.imported.MQTTClientProvider;
+import org.apache.activemq.artemis.tests.util.Wait;
import org.apache.activemq.artemis.utils.RandomUtil;
import org.junit.Assert;
import org.junit.Test;
@@ -1358,6 +1361,18 @@ public class StompTest extends StompTestBase {
assertNotNull(server.getActiveMQServer().getPostOffice().getBinding(new SimpleString(ResourceNames.JMS_QUEUE + nonExistentQueue)));
+ final Queue subscription = ((LocalQueueBinding)server.getActiveMQServer().getPostOffice().getBinding(new SimpleString(ResourceNames.JMS_QUEUE + nonExistentQueue))).getQueue();
+
+ assertTrue(Wait.waitFor(new Wait.Condition() {
+ @Override
+ public boolean isSatisfied() throws Exception {
+ if (subscription.getMessageCount() == 0)
+ return true;
+ else
+ return false;
+ }
+ }, 1000, 50));
+
frame = "UNSUBSCRIBE\n" + "destination:" +
getQueuePrefix() +
nonExistentQueue +
[2/2] activemq-artemis git commit: This closes #752
Posted by cl...@apache.org.
This closes #752
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/111945a2
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/111945a2
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/111945a2
Branch: refs/heads/master
Commit: 111945a2d11131409bf53b98227b6740091ea166
Parents: 3869d49 4bece40
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Sep 6 10:35:49 2016 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Sep 6 10:35:49 2016 -0400
----------------------------------------------------------------------
.../artemis/tests/integration/stomp/StompTest.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
----------------------------------------------------------------------