mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-03 20:24:24 -04:00
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.
This commit is contained in:
parent
260840a9b2
commit
9c58d9f740
1 changed files with 2 additions and 1 deletions
|
@ -25,7 +25,7 @@ public class NetworkStressTest {
|
||||||
private SeedNode seedNode;
|
private SeedNode seedNode;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setup() throws IOException, InterruptedException {
|
public void setUp() throws IOException, InterruptedException {
|
||||||
/** A barrier to wait for concurrent tasks. */
|
/** A barrier to wait for concurrent tasks. */
|
||||||
final CountDownLatch pendingTasks = new CountDownLatch(1 /*seed node*/);
|
final CountDownLatch pendingTasks = new CountDownLatch(1 /*seed node*/);
|
||||||
|
|
||||||
|
@ -87,6 +87,7 @@ public class NetworkStressTest {
|
||||||
public void tearDown() throws InterruptedException, IOException {
|
public void tearDown() throws InterruptedException, IOException {
|
||||||
/** A barrier to wait for concurrent tasks. */
|
/** A barrier to wait for concurrent tasks. */
|
||||||
final CountDownLatch pendingTasks = new CountDownLatch(seedNode != null? 1 : 0);
|
final CountDownLatch pendingTasks = new CountDownLatch(seedNode != null? 1 : 0);
|
||||||
|
|
||||||
// Stop the seed node.
|
// Stop the seed node.
|
||||||
if (seedNode != null) {
|
if (seedNode != null) {
|
||||||
seedNode.shutDown(pendingTasks::countDown);
|
seedNode.shutDown(pendingTasks::countDown);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue