Skip to content

Commit 5256bff

Browse files
committed
Add docstring for Test/Dial
1 parent 1821c3c commit 5256bff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

credentials/alts/internal/handshaker/service/service_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ const (
2929
testAddress2 = "some_address_2"
3030
)
3131

32+
// TestDial verifies the behavior of the Dial function in managing gRPC connections
33+
// and checks the below scenarios:
34+
// - First call to Dial with an address creates a new connection and stores it.
35+
// - Second call to Dial with the same address returns the existing connection
36+
// and expects the returned connection matching with ƒirst connection.
37+
// - Third call to Dial with a different address creates a separate new connection
38+
// and expects a different connection from connnection1 and connection2.
3239
func TestDial(t *testing.T) {
3340
temp := hsDialer
3441
hsDialer = func(target string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {

0 commit comments

Comments
 (0)