Add timeouts to the contexts in TestLoadSessionHandle#6022
Merged
Conversation
Pull Request Test Coverage Report for Build 20605497863Details
💛 - Coveralls |
calebdoxsey
approved these changes
Dec 30, 2025
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
#6011 wants to bump
google.golang.org/grpcfrom v1.77.0 to v1.78.0. [1] That is causing TestLoadSessionHandle in github.com/pomerium/pomerium/proxy to time out after 10 minutes. The tests create new proxies and call ServeHTTP on test requests. That execution gets all the way to GetDataBrokerRecord in querier.go, where it stalls out onres, err := q.Query(ctx, req, grpc.WaitForReady(true)).What I think is happening is
grpc.WaitForReady(true)makesq.Querywait for the GRPC client to connect to the server. grpc-go v1.78.0 fixes a bug where the client would stay in the IDLE state while trying to connect to the GRPC server. What happens now is the client moves to the TRANSIENT_FAILURE state. The WaitForReady option sees TRANSIENT_FAILURE and waits until that failure fixes itself.By setting a timeout in the context, we pass that context to
q.Queryeventually, the timeout fires, and GetDataBrokerRecord returns, which is what the test expected all along.[1]: I bisected the go.mod file in that branch to figure out which dependency was causing the test to time out.
Related issues
#6011
grpc/grpc-go#8710
User Explanation
This fixes a bug that was causing a test to fail. The test was relying on a bug in the grpc-go client, which was fixed.
Checklist
enhancement,bug,breaking,dependencies,ci)