[TEST] use more terminate calls and wait for termination

This commit is contained in:
Simon Willnauer 2014-09-23 13:58:47 +02:00
parent 30acba624d
commit 45319dc27f
2 changed files with 4 additions and 4 deletions

View File

@ -100,7 +100,7 @@ public class ZenFaultDetectionTests extends ElasticsearchTestCase {
super.tearDown();
serviceA.close();
serviceB.close();
threadPool.shutdown();
terminate(threadPool);
}
protected MockTransportService build(Settings settings, Version version) {

View File

@ -60,7 +60,7 @@ public class MulticastZenPingTests extends ElasticsearchTestCase {
}
@Test
public void testSimplePings() {
public void testSimplePings() throws InterruptedException {
Settings settings = ImmutableSettings.EMPTY;
settings = buildRandomMulticast(settings);
@ -128,7 +128,7 @@ public class MulticastZenPingTests extends ElasticsearchTestCase {
zenPingB.close();
transportServiceA.close();
transportServiceB.close();
threadPool.shutdown();
terminate(threadPool);
}
}
@ -178,7 +178,7 @@ public class MulticastZenPingTests extends ElasticsearchTestCase {
Loggers.getLogger(MulticastZenPing.class).setLevel("INFO");
if (multicastSocket != null) multicastSocket.close();
zenPingA.close();
threadPool.shutdown();
terminate(threadPool);
}
}
}