From 9c58d9f74087d5fbc28f5263c5773073b4108ab2 Mon Sep 17 00:00:00 2001 From: Ivan Vilata-i-Balaguer Date: Mon, 25 Apr 2016 10:53:00 +0200 Subject: [PATCH] Minor changes to network stress test I was going to override the ``runBare()`` method to cleanup on ``setUp()`` failures, but ``tearDown()`` is called all the same. --- .../test/java/io/bitsquare/p2p/network/NetworkStressTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/network/src/test/java/io/bitsquare/p2p/network/NetworkStressTest.java b/network/src/test/java/io/bitsquare/p2p/network/NetworkStressTest.java index c3280a01c6..3d8c39ca76 100644 --- a/network/src/test/java/io/bitsquare/p2p/network/NetworkStressTest.java +++ b/network/src/test/java/io/bitsquare/p2p/network/NetworkStressTest.java @@ -25,7 +25,7 @@ public class NetworkStressTest { private SeedNode seedNode; @Before - public void setup() throws IOException, InterruptedException { + public void setUp() throws IOException, InterruptedException { /** A barrier to wait for concurrent tasks. */ final CountDownLatch pendingTasks = new CountDownLatch(1 /*seed node*/); @@ -87,6 +87,7 @@ public class NetworkStressTest { public void tearDown() throws InterruptedException, IOException { /** A barrier to wait for concurrent tasks. */ final CountDownLatch pendingTasks = new CountDownLatch(seedNode != null? 1 : 0); + // Stop the seed node. if (seedNode != null) { seedNode.shutDown(pendingTasks::countDown);