activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-5734 - fix intermittent failure - seems the retained empty message gets dispatched so we need to consume it or it may have been dispatched to the client, causing a later failure
Date Tue, 28 Apr 2015 15:29:27 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 9ef425929 -> f5283a904


https://issues.apache.org/jira/browse/AMQ-5734 - fix intermittent failure - seems the retained
empty message gets dispatched so we need to consume it or it may have been dispatched to the
client, causing a later failure


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

Branch: refs/heads/master
Commit: f5283a904589eb4a9344fe42885cdacf92de68dd
Parents: 9ef4259
Author: gtully <gary.tully@gmail.com>
Authored: Tue Apr 28 16:15:18 2015 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Tue Apr 28 16:18:22 2015 +0100

----------------------------------------------------------------------
 .../org/apache/activemq/transport/mqtt/MQTTAuthTest.java     | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/f5283a90/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTAuthTest.java
----------------------------------------------------------------------
diff --git a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTAuthTest.java
b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTAuthTest.java
index 07a8cc9..77942a0 100644
--- a/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTAuthTest.java
+++ b/activemq-mqtt/src/test/java/org/apache/activemq/transport/mqtt/MQTTAuthTest.java
@@ -167,6 +167,13 @@ public class MQTTAuthTest extends MQTTAuthTestSupport {
         //delete retained message
         connection.publish(ANONYMOUS, "".getBytes(), QoS.AT_MOST_ONCE, true);
 
+        // that delete retained message gets dispatched! Wonder if that is expected?
+        // guess it is simpler if it is - it shows up on the assertNull:196 below on occasion
+        msg = connection.receive(1000, TimeUnit.MILLISECONDS);
+        assertNotNull(msg);
+        assertEquals(ANONYMOUS, new String(msg.getTopic()));
+        msg.ack();
+
         connection.disconnect();
 
         // Test 3.1 functionality
@@ -185,6 +192,7 @@ public class MQTTAuthTest extends MQTTAuthTestSupport {
         connectionPub.publish(NAMED, NAMED.getBytes(), QoS.AT_MOST_ONCE, true);
 
         msg = connection.receive(1000, TimeUnit.MILLISECONDS);
+        LOG.info("got msg: " + msg + ", " + (msg != null ? new String(msg.getTopic()) : ""));
         assertNull(msg);
     }
 


Mime
View raw message