fix typo in UDP connection helper function in tests (#4970)

This commit is contained in:
Marten Seemann
2025-02-24 09:39:29 +01:00
committed by GitHub
parent 6033030017
commit 751ca8dfb6
34 changed files with 230 additions and 230 deletions

View File

@@ -13,7 +13,7 @@ import (
func BenchmarkHandshake(b *testing.B) {
b.ReportAllocs()
ln, err := quic.Listen(newUPDConnLocalhost(b), tlsConfig, nil)
ln, err := quic.Listen(newUDPConnLocalhost(b), tlsConfig, nil)
require.NoError(b, err)
defer ln.Close()
@@ -28,7 +28,7 @@ func BenchmarkHandshake(b *testing.B) {
}
}()
tr := &quic.Transport{Conn: newUPDConnLocalhost(b)}
tr := &quic.Transport{Conn: newUDPConnLocalhost(b)}
defer tr.Close()
b.ResetTimer()
@@ -44,13 +44,13 @@ func BenchmarkHandshake(b *testing.B) {
func BenchmarkStreamChurn(b *testing.B) {
b.ReportAllocs()
ln, err := quic.Listen(newUPDConnLocalhost(b), tlsConfig, &quic.Config{MaxIncomingStreams: 1e10})
ln, err := quic.Listen(newUDPConnLocalhost(b), tlsConfig, &quic.Config{MaxIncomingStreams: 1e10})
require.NoError(b, err)
defer ln.Close()
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
conn, err := quic.Dial(ctx, newUPDConnLocalhost(b), ln.Addr(), tlsClientConfig, nil)
conn, err := quic.Dial(ctx, newUDPConnLocalhost(b), ln.Addr(), tlsClientConfig, nil)
require.NoError(b, err)
defer conn.CloseWithError(0, "")