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/04 01:43:34 UTC
[1/2] activemq-artemis git commit: NO-JIRA fix race in OpenWire temp
queue test
Repository: activemq-artemis
Updated Branches:
refs/heads/master 3c0f3cf52 -> acc34d908
NO-JIRA fix race in OpenWire temp queue test
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/bd7ec8cc
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/bd7ec8cc
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/bd7ec8cc
Branch: refs/heads/master
Commit: bd7ec8cca5abad555032596ebb139b2c72ab499f
Parents: 3c0f3cf
Author: Justin Bertram <jb...@apache.org>
Authored: Thu May 3 18:51:57 2018 -0500
Committer: Justin Bertram <jb...@apache.org>
Committed: Thu May 3 18:58:14 2018 -0500
----------------------------------------------------------------------
.../tests/integration/openwire/SimpleOpenWireTest.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/bd7ec8cc/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 7a86e8c..59c2e93 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
@@ -1606,11 +1606,10 @@ public class SimpleOpenWireTest extends BasicOpenWireTest {
public void testTempQueueSendAfterConnectionClose() throws Exception {
Connection connection1 = null;
- Connection connection2 = null;
+ final Connection connection2 = factory.createConnection();
try {
connection1 = factory.createConnection();
- connection2 = factory.createConnection();
connection1.start();
connection2.start();
@@ -1619,6 +1618,10 @@ public class SimpleOpenWireTest extends BasicOpenWireTest {
Session session2 = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer producer = session2.createProducer(tempQueue);
+
+ // need to wait here because the ActiveMQ client's temp destination map is updated asynchronously, not waiting can introduce a race
+ assertTrue(Wait.waitFor(() -> ((ActiveMQConnection)connection2).activeTempDestinations.size() == 1, 2000, 100));
+
producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
TextMessage m = session2.createTextMessage("Hello temp queue");
producer.send(m);
@@ -1631,6 +1634,9 @@ public class SimpleOpenWireTest extends BasicOpenWireTest {
//close first connection, let temp queue die
connection1.close();
+ // need to wait here because the ActiveMQ client's temp destination map is updated asynchronously, not waiting can introduce a race
+ assertTrue(Wait.waitFor(() -> ((ActiveMQConnection)connection2).activeTempDestinations.size() == 0, 2000, 100));
+
waitForBindings(this.server, tempQueue.getQueueName(), true, 0, 0, 5000);
//send again
try {
[2/2] activemq-artemis git commit: This closes #2070
Posted by cl...@apache.org.
This closes #2070
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/acc34d90
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/acc34d90
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/acc34d90
Branch: refs/heads/master
Commit: acc34d90881313d5c94a5a377aac9438175e55ef
Parents: 3c0f3cf bd7ec8c
Author: Clebert Suconic <cl...@apache.org>
Authored: Thu May 3 21:43:26 2018 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu May 3 21:43:26 2018 -0400
----------------------------------------------------------------------
.../tests/integration/openwire/SimpleOpenWireTest.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------