fix flaky TestALPN integration test (#4909)

This commit is contained in:
Marten Seemann
2025-01-21 04:04:26 -08:00
committed by GitHub
parent eb70424fba
commit bea70c6489

View File

@@ -409,7 +409,6 @@ func TestALPN(t *testing.T) {
require.NoError(t, err)
cs := conn.ConnectionState()
require.Equal(t, alpn, cs.TLS.NegotiatedProtocol)
require.NoError(t, conn.CloseWithError(0, ""))
select {
case c := <-acceptChan:
@@ -417,6 +416,7 @@ func TestALPN(t *testing.T) {
case <-time.After(time.Second):
t.Fatal("timeout waiting for server connection")
}
require.NoError(t, conn.CloseWithError(0, ""))
// now try with a different ALPN
tlsConf := getTLSClientConfig()