-
Notifications
You must be signed in to change notification settings - Fork 43
test: fix 10s unreachable timeout in helpers #313
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
test: fix 10s unreachable timeout in helpers #313
Conversation
Reviewer's GuideMoved the 10s timeout channel initialization outside retry loops in helper functions to ensure the overall timeout fires once instead of being reset each iteration. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Hi @walteh. Thanks for your PR. I'm waiting for a crc-org member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @walteh - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
cfergeau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
/lgtm
|
/ok-to-test |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfergeau The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Problem: The
10stimeout channel is created inside the retry loop, making it impossible for it to fire (the1scase always wins the select). So the helper retries forever.Solution: Move
timeout := time.After(10 * time.Second)outside the loop and watch the single channel in the select, so the helper returns an error after any failure beyond10soverall.Example of current behavior: A fast‑failing read of
/var/db/dhcpd_leasescausesretryIPFromMACto continue forever without returning an error.Note: No functional impact on production code, but it prevents local test runs from hanging and is much easier to debug.
Summary by Sourcery
Extract the 10s timeout channel out of the retry loops in test VM helpers to enforce an overall timeout and prevent infinite retries during testing.
Bug Fixes:
Tests: