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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
diff --git a/internal/quic/listener_test.go b/internal/quic/listener_test.go
index 674d4e4..037fb21 100644
--- a/internal/quic/listener_test.go
+++ b/internal/quic/listener_test.go
@@ -19,12 +19,12 @@
)
func TestConnect(t *testing.T) {
- NewLocalConnPair(t, &Config{}, &Config{})
+ newLocalConnPair(t, &Config{}, &Config{})
}
func TestStreamTransfer(t *testing.T) {
ctx := context.Background()
- cli, srv := NewLocalConnPair(t, &Config{}, &Config{})
+ cli, srv := newLocalConnPair(t, &Config{}, &Config{})
data := makeTestData(1 << 20)
srvdone := make(chan struct{})
@@ -61,11 +61,11 @@
}
}
-func NewLocalConnPair(t *testing.T, conf1, conf2 *Config) (clientConn, serverConn *Conn) {
+func newLocalConnPair(t *testing.T, conf1, conf2 *Config) (clientConn, serverConn *Conn) {
t.Helper()
ctx := context.Background()
- l1 := NewLocalListener(t, serverSide, conf1)
- l2 := NewLocalListener(t, clientSide, conf2)
+ l1 := newLocalListener(t, serverSide, conf1)
+ l2 := newLocalListener(t, clientSide, conf2)
c2, err := l2.Dial(ctx, "udp", l1.LocalAddr().String())
if err != nil {
t.Fatal(err)
@@ -77,7 +77,7 @@
return c2, c1
}
-func NewLocalListener(t *testing.T, side connSide, conf *Config) *Listener {
+func newLocalListener(t *testing.T, side connSide, conf *Config) *Listener {
t.Helper()
if conf.TLSConfig == nil {
newConf := *conf