fix connection gater integration test
This commit is contained in:
parent
92dd629f42
commit
21b74deab4
@ -182,8 +182,14 @@ func TestNetBlockPeer(t *testing.T) {
|
||||
t.Errorf("blocked peer not in blocked peer list")
|
||||
}
|
||||
|
||||
require.Error(t, secondNode.NetConnect(ctx, firstAddrInfo), "shouldn't be able to connect to second node")
|
||||
connectedness, err = secondNode.NetConnectedness(ctx, firstAddrInfo.ID)
|
||||
err = secondNode.NetConnect(ctx, firstAddrInfo)
|
||||
// With early muxer selection, we'll only learn that the handshake failed
|
||||
// when we do something with the connection, for example when we open a stream.
|
||||
if err == nil {
|
||||
_, err = secondNode.NetPing(context.Background(), firstAddrInfo.ID)
|
||||
}
|
||||
require.Error(t, err, "shouldn't be able to connect to second node")
|
||||
connectedness, err = firstNode.NetConnectedness(ctx, secondNodeID)
|
||||
require.NoError(t, err, "failed to determine connectedness")
|
||||
require.NotEqual(t, connectedness, network.Connected)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user