diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpConnection.java b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpConnection.java index 1c795a8c11..33280447d5 100644 --- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpConnection.java +++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpConnection.java @@ -226,7 +226,13 @@ public class AmqpConnection extends AmqpAbstractResource implements } } - serializer.shutdown(); + serializer.shutdownNow(); + try { + if (!serializer.awaitTermination(10, TimeUnit.SECONDS)) { + LOG.warn("Serializer didn't shutdown cleanly"); + } + } catch (InterruptedException e) { + } } } }