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.
This commit is contained in:
Marten Seemann 2022-04-25 18:36:02 +01:00 committed by GitHub
parent 29eeec7d3a
commit 39304c883f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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) {