p2p: Attempt to race check peer.Inbound() in TestServerDial

This commit is contained in:
Andrey Petrov 2018-06-07 10:31:09 -04:00
parent 699794d88d
commit 399aa710d5

View File

@ -181,6 +181,9 @@ func TestServerDial(t *testing.T) {
if peer := srv.Peers()[0]; !peer.Info().Network.Trusted {
t.Errorf("peer is not trusted after AddTrustedPeer: %v", peer)
}
if peer := srv.Peers()[0]; peer.Inbound() {
t.Errorf("peer is marked inbound")
}
srv.RemoveTrustedPeer(node)
if peer := srv.Peers()[0]; peer.Info().Network.Trusted {
t.Errorf("peer is trusted after RemoveTrustedPeer: %v", peer)