[TEST] use more terminate calls and wait for termination
This commit is contained in:
parent
30acba624d
commit
45319dc27f
|
@ -100,7 +100,7 @@ public class ZenFaultDetectionTests extends ElasticsearchTestCase {
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
serviceA.close();
|
serviceA.close();
|
||||||
serviceB.close();
|
serviceB.close();
|
||||||
threadPool.shutdown();
|
terminate(threadPool);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected MockTransportService build(Settings settings, Version version) {
|
protected MockTransportService build(Settings settings, Version version) {
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class MulticastZenPingTests extends ElasticsearchTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSimplePings() {
|
public void testSimplePings() throws InterruptedException {
|
||||||
Settings settings = ImmutableSettings.EMPTY;
|
Settings settings = ImmutableSettings.EMPTY;
|
||||||
settings = buildRandomMulticast(settings);
|
settings = buildRandomMulticast(settings);
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ public class MulticastZenPingTests extends ElasticsearchTestCase {
|
||||||
zenPingB.close();
|
zenPingB.close();
|
||||||
transportServiceA.close();
|
transportServiceA.close();
|
||||||
transportServiceB.close();
|
transportServiceB.close();
|
||||||
threadPool.shutdown();
|
terminate(threadPool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ public class MulticastZenPingTests extends ElasticsearchTestCase {
|
||||||
Loggers.getLogger(MulticastZenPing.class).setLevel("INFO");
|
Loggers.getLogger(MulticastZenPing.class).setLevel("INFO");
|
||||||
if (multicastSocket != null) multicastSocket.close();
|
if (multicastSocket != null) multicastSocket.close();
|
||||||
zenPingA.close();
|
zenPingA.close();
|
||||||
threadPool.shutdown();
|
terminate(threadPool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue