Skip to content

Commit 45fa414

Browse files
committed
quic: undo accidental rename of test helpers
https://go.dev/cl/539341 inadvertently made the newLocalConnPair and newLocalListener helpers exported. These are test-only functions, so the change isn't really important, but undo the rename to keep them consistent with other test helpers. Change-Id: Ie3860db3584fc83c0c0aa2ad0dda4cc5cb03351a Reviewed-on: https://go-review.googlesource.com/c/net/+/540116 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]>
1 parent 434956a commit 45fa414

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

internal/quic/listener_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ import (
1919
)
2020

2121
func TestConnect(t *testing.T) {
22-
NewLocalConnPair(t, &Config{}, &Config{})
22+
newLocalConnPair(t, &Config{}, &Config{})
2323
}
2424

2525
func TestStreamTransfer(t *testing.T) {
2626
ctx := context.Background()
27-
cli, srv := NewLocalConnPair(t, &Config{}, &Config{})
27+
cli, srv := newLocalConnPair(t, &Config{}, &Config{})
2828
data := makeTestData(1 << 20)
2929

3030
srvdone := make(chan struct{})
@@ -61,11 +61,11 @@ func TestStreamTransfer(t *testing.T) {
6161
}
6262
}
6363

64-
func NewLocalConnPair(t *testing.T, conf1, conf2 *Config) (clientConn, serverConn *Conn) {
64+
func newLocalConnPair(t *testing.T, conf1, conf2 *Config) (clientConn, serverConn *Conn) {
6565
t.Helper()
6666
ctx := context.Background()
67-
l1 := NewLocalListener(t, serverSide, conf1)
68-
l2 := NewLocalListener(t, clientSide, conf2)
67+
l1 := newLocalListener(t, serverSide, conf1)
68+
l2 := newLocalListener(t, clientSide, conf2)
6969
c2, err := l2.Dial(ctx, "udp", l1.LocalAddr().String())
7070
if err != nil {
7171
t.Fatal(err)
@@ -77,7 +77,7 @@ func NewLocalConnPair(t *testing.T, conf1, conf2 *Config) (clientConn, serverCon
7777
return c2, c1
7878
}
7979

80-
func NewLocalListener(t *testing.T, side connSide, conf *Config) *Listener {
80+
func newLocalListener(t *testing.T, side connSide, conf *Config) *Listener {
8181
t.Helper()
8282
if conf.TLSConfig == nil {
8383
newConf := *conf

0 commit comments

Comments
 (0)