Browse Source

swarm: don't check return value of str.Close in TestResourceManager (#1453)

If the stream was canceled, QUIC will return an error when calling Close.
tcp-tests-yamux
Marten Seemann 3 years ago
committed by GitHub
parent
commit
39304c883f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      p2p/net/swarm/swarm_test.go

2
p2p/net/swarm/swarm_test.go

@ -481,6 +481,7 @@ func TestResourceManager(t *testing.T) {
rcmgr2.EXPECT().OpenStream(s1.LocalPeer(), network.DirInbound).Return(streamScope2, nil)
str, err := s1.NewStream(context.Background(), s2.LocalPeer())
require.NoError(t, err)
defer str.Close()
str.Write([]byte("foobar"))
p := protocol.ID("proto")
@ -491,7 +492,6 @@ func TestResourceManager(t *testing.T) {
streamScope2.EXPECT().Done()
require.NoError(t, sstr.Close())
streamScope1.EXPECT().Done()
require.NoError(t, str.Close())
}
func TestResourceManagerNewStream(t *testing.T) {

Loading…
Cancel
Save