Skip to content

Commit

Permalink
Add docstring for Test/Dial
Browse files Browse the repository at this point in the history
  • Loading branch information
aranjans committed Jun 6, 2024
1 parent 1821c3c commit 5256bff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions credentials/alts/internal/handshaker/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ const (
testAddress2 = "some_address_2"
)

// TestDial verifies the behavior of the Dial function in managing gRPC connections
// and checks the below scenarios:
// - First call to Dial with an address creates a new connection and stores it.
// - Second call to Dial with the same address returns the existing connection
// 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) {
temp := hsDialer
hsDialer = func(target string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
Expand Down

0 comments on commit 5256bff

Please sign in to comment.