mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-03 05:57:21 +00:00
Fix unit test broken by less aggressive backoff time.
This commit is contained in:
committed by
Andreas Schildbach
parent
95009f0310
commit
60b0d917e7
@@ -656,7 +656,7 @@ public class PeerGroup extends AbstractExecutionThreadService implements Transac
|
||||
if (retryTime > nowMillis) {
|
||||
// Sleep until retry time
|
||||
final long millis = retryTime - nowMillis;
|
||||
log.info("Waiting {} msec before next connect attempt", millis, addr == null ? "" : " to " + addr);
|
||||
log.info("Waiting {} msec before next connect attempt {}", millis, addr == null ? "" : " to " + addr);
|
||||
Utils.sleep(millis);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -500,9 +500,7 @@ public class PeerGroupTest extends TestWithPeerGroup {
|
||||
stopPeerServer(2);
|
||||
assertEquals(2002, disconnectedPeers.take().getAddress().getPort()); // peer died
|
||||
|
||||
// Peer 2 is tried twice before peer 1, since it has a lower backoff due to recent success
|
||||
Utils.passMockSleep();
|
||||
assertEquals(2002, disconnectedPeers.take().getAddress().getPort());
|
||||
// Peer 2 is tried before peer 1, since it has a lower backoff due to recent success
|
||||
Utils.passMockSleep();
|
||||
assertEquals(2002, disconnectedPeers.take().getAddress().getPort());
|
||||
Utils.passMockSleep();
|
||||
|
||||
Reference in New Issue
Block a user