activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: NO-JIRA: Trivial test fix on StompPluginTest
Date Thu, 04 May 2017 20:02:56 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master b9e7e7ed9 -> 800976ec7


NO-JIRA: Trivial test fix on StompPluginTest


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

Branch: refs/heads/master
Commit: 800976ec764f0990e1b6d9601c6edb3f7dbc584c
Parents: b9e7e7e
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Thu May 4 15:32:26 2017 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Thu May 4 15:58:15 2017 -0400

----------------------------------------------------------------------
 .../tests/integration/plugin/MethodCalledVerifier.java        | 7 ++++++-
 .../artemis/tests/integration/plugin/StompPluginTest.java     | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/800976ec/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/MethodCalledVerifier.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/MethodCalledVerifier.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/MethodCalledVerifier.java
index 14aa4a1..a055f06 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/MethodCalledVerifier.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/MethodCalledVerifier.java
@@ -31,7 +31,7 @@ import org.apache.activemq.artemis.core.server.plugin.ActiveMQServerPlugin;
 import org.apache.activemq.artemis.core.transaction.Transaction;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
 import org.apache.activemq.artemis.spi.core.protocol.SessionCallback;
-
+import org.apache.activemq.artemis.tests.util.Wait;
 
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -265,6 +265,11 @@ public class MethodCalledVerifier implements ActiveMQServerPlugin {
 
    public void validatePluginMethodsAtLeast(int count, String... names) {
       Arrays.asList(names).forEach(name -> {
+         try {
+            Wait.waitFor(() -> count <= methodCalls.getOrDefault(name, new AtomicInteger()).get());
+         } catch (Exception e) {
+            e.printStackTrace();
+         }
          assertTrue("validating method " + name, count <= methodCalls.getOrDefault(name,
new AtomicInteger()).get());
       });
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/800976ec/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/StompPluginTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/StompPluginTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/StompPluginTest.java
index c771272..5c5438a 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/StompPluginTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/StompPluginTest.java
@@ -98,7 +98,7 @@ public class StompPluginTest extends StompTestBase {
    @Test
    public void testSendAndReceive() throws Exception {
 
-      // subscribehoward county escaped
+      // subscribe
       StompClientConnection newConn = StompClientConnectionFactory.createClientConnection("1.2",
hostname, port);
       newConn.connect(defUser, defPass);
       subscribe(newConn, "a-sub");


Mime
View raw message