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 2014/12/08 15:01:20 UTC
[2/3] activemq git commit: fix JMSClientNioTest close timeout leaving
broker hanging about
fix JMSClientNioTest close timeout leaving broker hanging about
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/db65c2e0
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/db65c2e0
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/db65c2e0
Branch: refs/heads/trunk
Commit: db65c2e02714a542e83690b36aca312b962b8bcf
Parents: 80a4fb7
Author: gtully <ga...@gmail.com>
Authored: Mon Dec 8 13:54:46 2014 +0000
Committer: gtully <ga...@gmail.com>
Committed: Mon Dec 8 14:00:42 2014 +0000
----------------------------------------------------------------------
.../apache/activemq/transport/amqp/AmqpTestSupport.java | 11 ++++++-----
.../activemq/transport/amqp/JMSClientTestSupport.java | 6 +++---
2 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/db65c2e0/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
index 2f2f5af..23a964d 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
@@ -217,12 +217,13 @@ public class AmqpTestSupport {
LOG.debug("tearDown started.");
future.get(60, TimeUnit.SECONDS);
} catch (TimeoutException e) {
- throw new Exception("startBroker timed out");
- }
- executor.shutdownNow();
+ throw new Exception("stopBroker timed out");
+ } finally {
+ executor.shutdownNow();
- if (killHungThreads("tearDown")) {
- LOG.warn("HUNG THREADS in setUp");
+ if (killHungThreads("tearDown")) {
+ LOG.warn("HUNG THREADS in tearDown");
+ }
}
}
http://git-wip-us.apache.org/repos/asf/activemq/blob/db65c2e0/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTestSupport.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTestSupport.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTestSupport.java
index b374ee8..f53eee3 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTestSupport.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientTestSupport.java
@@ -45,10 +45,10 @@ public class JMSClientTestSupport extends AmqpTestSupport {
future.get(60, TimeUnit.SECONDS);
} catch (TimeoutException e) {
throw new Exception("CloseConnection timed out");
+ } finally {
+ executor.shutdownNow();
+ super.tearDown();
}
- executor.shutdownNow();
-
- super.tearDown();
}
public class CloseConnectionTask implements Callable<Boolean> {