Skip to content

Commit

Permalink
fix flaky TestResourceManagerAcceptStream test
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Apr 22, 2022
1 parent 456b36f commit 7e49f52
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions p2p/net/swarm/swarm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,8 @@ func TestResourceManagerAcceptStream(t *testing.T) {
str, err := s1.NewStream(context.Background(), s2.LocalPeer())
require.NoError(t, err)
_, err = str.Write([]byte("foobar"))
require.NoError(t, err)
_, err = str.Read([]byte{0})
if err == nil {
_, err = str.Read([]byte{0})
}
require.EqualError(t, err, "stream reset")
}

0 comments on commit 7e49f52

Please sign in to comment.