Skip to content

Commit

Permalink
fix: easwar comment
Browse files Browse the repository at this point in the history
  • Loading branch information
aranjans committed Jun 12, 2024
1 parent d8a2ca2 commit af40023
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion credentials/alts/internal/handshaker/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,19 @@
package service

import (
"google.golang.org/grpc"
"google.golang.org/grpc/internal/grpctest"
"testing"
)

type s struct {
grpctest.Tester
}

func Test(t *testing.T) {
grpctest.RunSubTests(t, s{})
}

const (
testAddress1 = "some_address_1"
testAddress2 = "some_address_2"
Expand All @@ -34,7 +44,14 @@ const (
// and expects the returned connection matching with ƒirst connection.
// - Third call to Dial with a different address creates a separate new connection
// and expects a different connection from connnection1 and connection2.
func TestDial(t *testing.T) {
func (s) TestDial(t *testing.T) {
temp := hsDialer
hsDialer = func(target string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
return &grpc.ClientConn{}, nil
}
defer func() {
hsDialer = temp
}()
// First call to Dial, it should create a connection to the server running
// at the given address.
conn1, err := Dial(testAddress1)
Expand Down

0 comments on commit af40023

Please sign in to comment.