Skip to content

Conversation

@easwars
Copy link
Contributor

@easwars easwars commented Jan 11, 2022

Fixes #5091

The oauth package, as part of checking whether it is running on GCE,
creates a persistent connection to the metadata server. This persistent
connection spawns a couple of goroutines, one to read and one to write.
And these goroutines show up in our leakchecker.

We are not testing perRPC credentials in this test and can safely stub
out the oauth package to make the leakchecker happy.

RELEASE NOTES: none

The oauth package, as part of checking whether it is running on GCE,
creates a persistent connection to the metadata server. This persistent
connection spawns a couple of goroutines, one to read and one to write.
And these goroutines show up in our leakchecker.

We are not testing perRPC credentials in this test and can safely stub
out the oauth package to make the leakchecker happy.
@easwars easwars added this to the 1.44 Release milestone Jan 11, 2022
@easwars easwars requested a review from dfawley January 11, 2022 18:44
}
origNewADC := newADC
newADC = func(context.Context) (credentials.PerRPCCredentials, error) {
return &testPerRPCCreds{}, nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since testPerRPCCreds.PerRPCCredentials is not initialized, then it must not be getting called, right? Can't this just return nil, nil then, and delete that type?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks.

@zasweq zasweq modified the milestones: 1.44 Release, 1.45 Release Jan 11, 2022
@easwars easwars merged commit 9353ae3 into grpc:master Jan 11, 2022
@easwars easwars deleted the TestClientHandshakeBasedOnClusterName branch March 21, 2022 21:20
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Goroutine leaks in TestClientHandshakeBasedOnClusterName

3 participants