You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ma...@apache.org on 2017/02/14 20:30:46 UTC
activemq-artemis git commit: NO-JIRA Fix after cherry-pick
Repository: activemq-artemis
Updated Branches:
refs/heads/1.x b3988647f -> e47b5d695
NO-JIRA Fix after cherry-pick
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/e47b5d69
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/e47b5d69
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/e47b5d69
Branch: refs/heads/1.x
Commit: e47b5d695181cded463249b0d4192040bb5e4796
Parents: b398864
Author: Martyn Taylor <mt...@redhat.com>
Authored: Tue Feb 14 20:25:00 2017 +0000
Committer: Martyn Taylor <mt...@redhat.com>
Committed: Tue Feb 14 20:28:29 2017 +0000
----------------------------------------------------------------------
.../core/protocol/mqtt/MQTTConnectionManager.java | 2 +-
.../tests/integration/mqtt/imported/MQTTTest.java | 13 ++++++-------
2 files changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e47b5d69/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnectionManager.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnectionManager.java b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnectionManager.java
index 182ebad..8df2085 100644
--- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnectionManager.java
+++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnectionManager.java
@@ -133,7 +133,7 @@ public class MQTTConnectionManager {
}
private void sendWill() throws Exception {
- session.getServer().getPostOffice().route(session.getSessionState().getWillMessage(), true);
+ session.getServer().getPostOffice().route(session.getSessionState().getWillMessage(), null, true);
session.getSessionState().deleteWillMessage();
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e47b5d69/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java
index 8575574..7c95f6f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java
@@ -35,6 +35,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
+import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.core.protocol.mqtt.MQTTConnectionManager;
import org.apache.activemq.artemis.core.protocol.mqtt.MQTTSession;
import org.apache.activemq.artemis.tests.integration.mqtt.imported.util.Wait;
@@ -995,7 +996,7 @@ public class MQTTTest extends MQTTTestSupport {
@Test(timeout = 60 * 1000)
public void testClientConnectionFailureSendsWillMessage() throws Exception {
- getServer().createQueue(SimpleString.toSimpleString("will"), RoutingType.MULTICAST, SimpleString.toSimpleString("will"), null, true, false);
+ getServer().createQueue(SimpleString.toSimpleString("will"), SimpleString.toSimpleString("will"), null, true, false);
MQTT mqtt = createMQTTConnection("1", false);
mqtt.setKeepAlive((short) 1);
@@ -1005,12 +1006,10 @@ public class MQTTTest extends MQTTTestSupport {
final BlockingConnection connection = mqtt.blockingConnection();
connection.connect();
- Wait.waitFor(new Wait.Condition() {
- @Override
- public boolean isSatisfied() throws Exception {
- return connection.isConnected();
- }
- });
+ long time = System.currentTimeMillis();
+ while (connection.isConnected() && time + 10000 < System.currentTimeMillis()) {
+ Thread.sleep(1000);
+ }
MQTT mqtt2 = createMQTTConnection("2", false);
BlockingConnection connection2 = mqtt2.blockingConnection();