You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2017/03/14 11:59:32 UTC
activemq git commit: [AMQ-6561] fix up unit test that expects socket
to remain open after InvalidClientIDException,
dubious expectation in the test that wants to verify broker is ok
Repository: activemq
Updated Branches:
refs/heads/master c5a8b2c8b -> 36689beff
[AMQ-6561] fix up unit test that expects socket to remain open after InvalidClientIDException, dubious expectation in the test that wants to verify broker is ok
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/36689bef
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/36689bef
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/36689bef
Branch: refs/heads/master
Commit: 36689beff755fd6391c3a8291d1e89fc782eac0d
Parents: c5a8b2c
Author: gtully <ga...@gmail.com>
Authored: Tue Mar 14 11:59:13 2017 +0000
Committer: gtully <ga...@gmail.com>
Committed: Tue Mar 14 11:59:13 2017 +0000
----------------------------------------------------------------------
.../apache/activemq/broker/DoubleSubscriptionTest.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/36689bef/activemq-unit-tests/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java
index 8fd1292..4f15d33 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java
@@ -17,6 +17,7 @@
package org.apache.activemq.broker;
import javax.jms.DeliveryMode;
+import javax.jms.InvalidClientIDException;
import junit.framework.Test;
import org.apache.activemq.command.ActiveMQDestination;
@@ -88,10 +89,13 @@ public class DoubleSubscriptionTest extends NetworkTestSupport {
// Now we're going to resend the same consumer commands again and see if
// the broker
// can handle it.
- connection1.send(connectionInfo1);
- connection1.send(sessionInfo1);
- connection1.request(consumerInfo1);
-
+ try {
+ connection1.send(connectionInfo1);
+ connection1.send(sessionInfo1);
+ connection1.request(consumerInfo1);
+ } catch (InvalidClientIDException expected) {
+ // //AMQ-6561 - delayed stop for all exceptions on addConnection
+ }
// After this there should be 2 messages on the broker...
connection2.request(createMessage(producerInfo2, destination, DeliveryMode.PERSISTENT));