mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-15 03:35:52 +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);
|
connectWithVersion(500);
|
||||||
connectedFuture.get();
|
// We must wait uninterruptibly here because connect[WithVersion] generates a peer that interrupts the current
|
||||||
disconnectedFuture.get();
|
// thread when it disconnects.
|
||||||
|
Uninterruptibles.getUninterruptibly(connectedFuture);
|
||||||
|
Uninterruptibles.getUninterruptibly(disconnectedFuture);
|
||||||
try {
|
try {
|
||||||
peer.writeTarget.writeBytes(new byte[1]);
|
peer.writeTarget.writeBytes(new byte[1]);
|
||||||
fail();
|
fail();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user