use assert.AnError consistently in tests (#5066)

No functional change expected.
This commit is contained in:
Marten Seemann
2025-04-21 09:52:08 +08:00
committed by GitHub
parent d35b5ac187
commit b3f55bb7b7
16 changed files with 77 additions and 84 deletions

View File

@@ -3,7 +3,6 @@ package self_test
import (
"context"
"crypto/tls"
"errors"
"net"
"sync/atomic"
"testing"
@@ -13,6 +12,7 @@ import (
quicproxy "github.com/quic-go/quic-go/integrationtests/tools/proxy"
"github.com/quic-go/quic-go/internal/protocol"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -166,8 +166,7 @@ func TestTransportClose(t *testing.T) {
t.Setenv("QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING", "true")
bc := newBrokenConn(newUDPConnLocalhost(t))
testErr := errors.New("test error")
testTransportClose(t, bc, func() { bc.Break(testErr) }, testErr)
testTransportClose(t, bc, func() { bc.Break(assert.AnError) }, assert.AnError)
})
}