mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 18:25:51 +00:00
Bug fix to avoid a flake in PeerTest.
There seem to be other cases where unit tests can be flaky with nonetty. More fixes will come later.
This commit is contained in:
parent
ce4ac86884
commit
69f52c1b8a
@ -799,8 +799,10 @@ public class PeerTest extends TestWithNetworkConnections {
|
||||
}
|
||||
});
|
||||
connectWithVersion(500);
|
||||
connectedFuture.get();
|
||||
disconnectedFuture.get();
|
||||
// We must wait uninterruptibly here because connect[WithVersion] generates a peer that interrupts the current
|
||||
// thread when it disconnects.
|
||||
Uninterruptibles.getUninterruptibly(connectedFuture);
|
||||
Uninterruptibles.getUninterruptibly(disconnectedFuture);
|
||||
try {
|
||||
peer.writeTarget.writeBytes(new byte[1]);
|
||||
fail();
|
||||
|
Loading…
x
Reference in New Issue
Block a user