Repository: activemq-artemis Updated Branches: refs/heads/master 36a948b22 -> 0bfdcb764
NO-JIRA: more fixes on plugintests some asynchronously things on the server were making these to fail. add some checkpoints to make sure it happens smoothly. Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/0bfdcb76 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/0bfdcb76 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/0bfdcb76 Branch: refs/heads/master Commit: 0bfdcb764c526c867c130f9db9ac51fd604879ff Parents: 36a948b Author: Clebert Suconic <[email protected]> Authored: Thu Jul 13 09:19:13 2017 -0400 Committer: Clebert Suconic <[email protected]> Committed: Thu Jul 13 09:19:15 2017 -0400 ---------------------------------------------------------------------- .../artemis/tests/integration/plugin/CorePluginTest.java | 6 ++++-- .../artemis/tests/integration/plugin/MethodCalledVerifier.java | 2 +- .../artemis/tests/integration/plugin/StompPluginTest.java | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0bfdcb76/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/CorePluginTest.java ---------------------------------------------------------------------- diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/CorePluginTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/CorePluginTest.java index 9f6b4ea..52a7798 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/CorePluginTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/CorePluginTest.java @@ -176,8 +176,10 @@ public class CorePluginTest extends JMSTestBase { prod.setTimeToLive(500); MessageConsumer cons = sess.createConsumer(queue); - TextMessage msg1 = sess.createTextMessage("test"); - prod.send(msg1); + for (int i = 0; i < 10; i++) { + TextMessage msg1 = sess.createTextMessage("test"); + prod.send(msg1); + } Thread.sleep(500); assertNull(cons.receive(500)); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0bfdcb76/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 de339f5..c42dd11 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 @@ -278,7 +278,7 @@ public class MethodCalledVerifier implements ActiveMQServerPlugin { } catch (Exception e) { e.printStackTrace(); } - assertTrue("validating method " + name, count <= methodCalls.getOrDefault(name, new AtomicInteger()).get()); + assertTrue("validating method " + name + " expected less than " + count, count <= methodCalls.getOrDefault(name, new AtomicInteger()).get()); }); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0bfdcb76/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 5c5438a..6f4445f 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 @@ -109,6 +109,10 @@ public class StompPluginTest extends StompTestBase { System.out.println("received " + frame); Assert.assertEquals(Stomp.Responses.MESSAGE, frame.getCommand()); + verifier.validatePluginMethodsAtLeast(1, MESSAGE_ACKED, BEFORE_SEND, AFTER_SEND, BEFORE_MESSAGE_ROUTE, AFTER_MESSAGE_ROUTE, BEFORE_DELIVER, + AFTER_DELIVER); + + // unsub unsubscribe(newConn, "a-sub");
