]> git.feebdaed.xyz Git - 0xmirror/quic-go.git/commitdiff
remove stray assertion that handshakes are running from tests (#5123)
authorMarten Seemann <martenseemann@gmail.com>
Tue, 6 May 2025 02:13:38 +0000 (10:13 +0800)
committerGitHub <noreply@github.com>
Tue, 6 May 2025 02:13:38 +0000 (09:13 +0700)
The RunHandshake method this function was basing its assertion on was
removed a long time ago.

integrationtests/self/self_test.go
integrationtests/self/timeout_test.go

index e1ea1127685cfd233aa3a0fd8d48cf65f3631204..7516cafc6a15d3a07e0b5948bd20053359ef0737 100644 (file)
@@ -161,12 +161,6 @@ func newUDPConnLocalhost(t testing.TB) *net.UDPConn {
        return conn
 }
 
-func areHandshakesRunning() bool {
-       var b bytes.Buffer
-       pprof.Lookup("goroutine").WriteTo(&b, 1)
-       return strings.Contains(b.String(), "RunHandshake")
-}
-
 func areTransportsRunning() bool {
        var b bytes.Buffer
        pprof.Lookup("goroutine").WriteTo(&b, 1)
@@ -194,10 +188,6 @@ func TestMain(m *testing.M) {
        if status != 0 {
                os.Exit(status)
        }
-       if areHandshakesRunning() {
-               fmt.Println("stray handshake goroutines found")
-               os.Exit(1)
-       }
        if areTransportsRunning() {
                fmt.Println("stray transport goroutines found")
                os.Exit(1)
index a4fabb6f6f020af09aec854d6faf8527b17cae88..a09beb0fdd9f2c1498d410901a50317dd93104eb 100644 (file)
@@ -498,8 +498,6 @@ func testFaultyPacketConn(t *testing.T, pers protocol.Perspective) {
                require.True(t, nerr.Timeout())
        }
 
-       require.Eventually(t, func() bool { return !areHandshakesRunning() }, 5*handshakeTimeout, 5*time.Millisecond)
-
        select {
        case serverErr := <-serverErrChan: // The handshake completed on the server side.
                require.Error(t, serverErr)