Do not wait on seed node if not created in network stress test

This commit is contained in:
Ivan Vilata-i-Balaguer 2016-04-25 10:33:33 +02:00
parent 718c935fef
commit 260840a9b2

View File

@ -86,7 +86,7 @@ public class NetworkStressTest {
@After
public void tearDown() throws InterruptedException, IOException {
/** A barrier to wait for concurrent tasks. */
final CountDownLatch pendingTasks = new CountDownLatch(1 /*seed node*/);
final CountDownLatch pendingTasks = new CountDownLatch(seedNode != null? 1 : 0);
// Stop the seed node.
if (seedNode != null) {
seedNode.shutDown(pendingTasks::countDown);