Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: J. Yi <[email protected]>
  • Loading branch information
fortuna and jyyi1 authored Jan 2, 2024
1 parent f8c7bf8 commit e6cb5c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion transport/packet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ func TestFuncPacketEndpoint(t *testing.T) {
func TestFuncPacketDialer(t *testing.T) {
expectedConn := &fakeConn{}
expectedErr := errors.New("fake error")
dialer := FuncPacketDialer(func(ctx context.Context, add string) (net.Conn, error) {
dialer := FuncPacketDialer(func(ctx context.Context, addr string) (net.Conn, error) {
require.Equal(t, "unused", addr)
return expectedConn, expectedErr
})
conn, err := dialer.Dial(context.Background(), "unused")
Expand Down
3 changes: 2 additions & 1 deletion transport/stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ func TestFuncStreamEndpoint(t *testing.T) {
func TestFuncStreamDialer(t *testing.T) {
expectedConn := &fakeConn{}
expectedErr := errors.New("fake error")
dialer := FuncStreamDialer(func(ctx context.Context, add string) (StreamConn, error) {
dialer := FuncStreamDialer(func(ctx context.Context, addr string) (StreamConn, error) {
require.Equal(t, "unused", addr)
return expectedConn, expectedErr
})
conn, err := dialer.Dial(context.Background(), "unused")
Expand Down

0 comments on commit e6cb5c3

Please sign in to comment.