mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-21 16:16:27 -04:00
Check for timeout when starting and stopping nodes in mailbox stress test
This commit is contained in:
parent
554652c6fe
commit
1f6ea10bd6
@ -392,7 +392,8 @@ public class NetworkStressTest {
|
||||
// When done, put first online peer offline.
|
||||
final CountDownLatch stopLatch = new CountDownLatch(1);
|
||||
peerNodes.get(firstOnline).shutDown(stopLatch::countDown);
|
||||
stopLatch.await(10, TimeUnit.SECONDS);
|
||||
assertLatch("timed out while stopping peer " + firstOnline,
|
||||
stopLatch, 10, TimeUnit.SECONDS);
|
||||
print("put peer %d offline", firstOnline);
|
||||
|
||||
// When done, put first offline peer online.
|
||||
@ -401,10 +402,11 @@ public class NetworkStressTest {
|
||||
// TODO: Setup message listeners.
|
||||
peerNodes.set(firstOffline, startedPeer);
|
||||
startedPeer.start(new MailboxStartListener(startLatch));
|
||||
startLatch.await(10, TimeUnit.SECONDS);
|
||||
assertLatch("timed out while starting peer " + firstOffline,
|
||||
startLatch, 10, TimeUnit.SECONDS);
|
||||
print("put peer %d online", firstOffline);
|
||||
}
|
||||
// TODO: Wait for nodes to receive messages, use meaningful timeout.
|
||||
// TODO: Use meaningful timeout.
|
||||
assertLatch("timed out while receiving mailbox messages",
|
||||
receivedMailboxLatch, 120, TimeUnit.SECONDS);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user