Skip to content

Commit

Permalink
quic: undo accidental rename of test helpers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
neild committed Nov 6, 2023
1 parent 434956a commit 45fa414
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/quic/listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import (
)

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{})
Expand Down Expand Up @@ -61,11 +61,11 @@ func TestStreamTransfer(t *testing.T) {
}
}

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)
Expand All @@ -77,7 +77,7 @@ func NewLocalConnPair(t *testing.T, conf1, conf2 *Config) (clientConn, serverCon
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
Expand Down

0 comments on commit 45fa414

Please sign in to comment.