Backport: fix flaky Test_grpcConnectionManager_Peers (#4276)#4382
Merged
Conversation
…g down (#4276) Test_grpcConnectionManager_Peers/inbound_stream_triggers_observer and the mirror outbound subtest set Authenticate expectations on both peer's authenticator mocks but only waited for one side's observer to fire before calling cm2.Stop(). When the observed side won the race, the other side's authenticator could still be in flight when t.Cleanup ran gomock's Finish(), reporting a missing call. Extend the wait condition to also require the unobserved side's Peers() list to be populated, which only happens after that side's Authenticate returns. Assisted-by: AI
Contributor
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Backports #4276 (already on master since d6ab80f) to V5.4.
Test_grpcConnectionManager_Peers/inbound_stream_triggers_observer(and the mirror outbound subtest) setsAuthenticateexpectations on both peers' mocks, but only waited for one side's observer before tearing down. When the unobserved side's authentication was still in flight,t.Cleanupran gomock'sFinish()before that call landed, reporting a missing call.V5.4 never received this fix, so PRs targeting this branch still hit the flake — see #4380.
Test plan
go test -race -count=20 -run Test_grpcConnectionManager_Peers ./network/transport/grpc/passes locallyRelated to #4380