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 2018/05/07 21:34:23 UTC

[2/2] activemq-artemis git commit: NO-JIRA fix another OpenWire race

NO-JIRA fix another OpenWire race


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

Branch: refs/heads/master
Commit: 67964facf01de01ea3078c3b1b6e5813845925b6
Parents: 88b1371
Author: Justin Bertram <jb...@apache.org>
Authored: Mon May 7 15:25:23 2018 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Mon May 7 17:34:15 2018 -0400

----------------------------------------------------------------------
 .../artemis/tests/integration/openwire/SimpleOpenWireTest.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/67964fac/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
index 59c2e93..77efd28 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
@@ -729,6 +729,9 @@ public class SimpleOpenWireTest extends BasicOpenWireTest {
          TopicSession newTopicSession = newConn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
          TopicPublisher publisher = newTopicSession.createPublisher(tempTopic);
 
+         // need to wait here because the ActiveMQ client's temp destination map is updated asynchronously, not waiting can introduce a race
+         assertTrue(Wait.waitFor(() -> newConn.activeTempDestinations.size() == 1, 2000, 100));
+
          TextMessage msg = newTopicSession.createTextMessage("Test Message");
 
          publisher.publish(msg);