Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix slow test startup #5245

Merged
merged 2 commits into from
Feb 18, 2025
Merged

Conversation

paskozdilar
Copy link
Contributor

References to other Issues or PRs

Fixes #5244

Have you read the Contributing Guidelines?

Yes.

Brief description of what is fixed or changed

The waitForGateway method waited 10 seconds in a loop for healthzServer to return StatusOK.
The healthzServer function returns StatusOK only if conn.GetState() is connectivity.Ready - but that never happened because connection stays idle before the first method call.
To resolve this, if we detect that the connection is idle, we call any method (in this case, we chose "/grpc.health.v1.Health/Check" as it seemed like an appropriate name) and ignore its result, just to get the connection started.

This fixes the test startup delay.

Other comments

Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

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

Great detective work here! Looks like there's a minor bazel diff, after that is fixed we can merge this :).

@paskozdilar
Copy link
Contributor Author

Done.

@johanbrandhorst johanbrandhorst merged commit 61beb2b into grpc-ecosystem:main Feb 18, 2025
14 checks passed
@johanbrandhorst
Copy link
Collaborator

Thanks for your contribution!

@paskozdilar
Copy link
Contributor Author

Thank you for your patience and support :)

@paskozdilar paskozdilar deleted the fix-slow-tests branch February 19, 2025 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow test startup
2 participants