From 1b8d8da648f86878796bb0f757449d6f1b1bd486 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Tue, 17 Feb 2015 09:32:23 +0100 Subject: [PATCH] [TEST] use util method to propperly shudtown threadpools --- .../transport/netty/NettyTransportMultiPortTests.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortTests.java b/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortTests.java index e6876870c1e..20a1731e0c9 100644 --- a/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortTests.java +++ b/src/test/java/org/elasticsearch/transport/netty/NettyTransportMultiPortTests.java @@ -70,7 +70,7 @@ public class NettyTransportMultiPortTests extends ElasticsearchTestCase { assertPortIsBound(ports[1]); assertPortIsBound(ports[2]); } finally { - threadPool.shutdownNow(); + terminate(threadPool); } } @@ -89,7 +89,7 @@ public class NettyTransportMultiPortTests extends ElasticsearchTestCase { assertPortIsBound(ports[0]); assertPortIsBound(ports[1]); } finally { - threadPool.shutdownNow(); + terminate(threadPool); } } @@ -107,7 +107,7 @@ public class NettyTransportMultiPortTests extends ElasticsearchTestCase { try (NettyTransport ignored = startNettyTransport(settings, threadPool)) { assertPortIsBound(ports[0]); } finally { - threadPool.shutdownNow(); + terminate(threadPool); } } @@ -128,7 +128,7 @@ public class NettyTransportMultiPortTests extends ElasticsearchTestCase { assertConnectionRefused(ports[1]); assertPortIsBound(ports[2]); } finally { - threadPool.shutdownNow(); + terminate(threadPool); } } @@ -151,7 +151,7 @@ public class NettyTransportMultiPortTests extends ElasticsearchTestCase { assertPortIsBound(firstNonLoopbackAddress.getHostAddress(), ports[1]); assertConnectionRefused(ports[1]); } finally { - threadPool.shutdownNow(); + terminate(threadPool); } }