mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-02 03:36:24 -04:00
Minor changes to comments and printed messages
This commit is contained in:
parent
53901ba798
commit
109a71cd7f
1 changed files with 3 additions and 3 deletions
|
@ -186,7 +186,7 @@ public class NetworkStressTest {
|
||||||
final CountDownLatch receivedDirectLatch = new CountDownLatch(nPeers);
|
final CountDownLatch receivedDirectLatch = new CountDownLatch(nPeers);
|
||||||
final Instant sendStart = Instant.now();
|
final Instant sendStart = Instant.now();
|
||||||
for (final P2PService srcPeer : peerNodes) {
|
for (final P2PService srcPeer : peerNodes) {
|
||||||
// Make peer ready for receiving direct messages.
|
// Make the peer ready for receiving direct messages.
|
||||||
srcPeer.addDecryptedDirectMessageListener((decryptedMsgWithPubKey, peerNodeAddress) -> {
|
srcPeer.addDecryptedDirectMessageListener((decryptedMsgWithPubKey, peerNodeAddress) -> {
|
||||||
if (!(decryptedMsgWithPubKey.message instanceof StressTestDirectMessage))
|
if (!(decryptedMsgWithPubKey.message instanceof StressTestDirectMessage))
|
||||||
return;
|
return;
|
||||||
|
@ -218,12 +218,12 @@ public class NetworkStressTest {
|
||||||
// Wait for peers to complete receiving.
|
// Wait for peers to complete receiving.
|
||||||
org.junit.Assert.assertTrue("timed out while receiving direct messages",
|
org.junit.Assert.assertTrue("timed out while receiving direct messages",
|
||||||
receivedDirectLatch.await(30, TimeUnit.SECONDS));
|
receivedDirectLatch.await(30, TimeUnit.SECONDS));
|
||||||
print("receiving 1 direct message per node took %ss",
|
print("receiving 1 direct message per peer took %ss",
|
||||||
Duration.between(sendStart, Instant.now()).toMillis()/1000.0);
|
Duration.between(sendStart, Instant.now()).toMillis()/1000.0);
|
||||||
// Wait for peers to complete sending.
|
// Wait for peers to complete sending.
|
||||||
org.junit.Assert.assertTrue("timed out while sending direct messages",
|
org.junit.Assert.assertTrue("timed out while sending direct messages",
|
||||||
sentDirectLatch.await(30, TimeUnit.SECONDS));
|
sentDirectLatch.await(30, TimeUnit.SECONDS));
|
||||||
print("sending 1 direct message per node took %ss",
|
print("sending 1 direct message per peer took %ss",
|
||||||
Duration.between(sendStart, Instant.now()).toMillis()/1000.0);
|
Duration.between(sendStart, Instant.now()).toMillis()/1000.0);
|
||||||
org.junit.Assert.assertFalse("some peer(s) failed to send a direct message", sentDirectFailed.get());
|
org.junit.Assert.assertFalse("some peer(s) failed to send a direct message", sentDirectFailed.get());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue