-
Notifications
You must be signed in to change notification settings - Fork 141
fix: Make test iter deterministic to fix flake #1231
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: Make test iter deterministic to fix flake #1231
Conversation
The test for the BestHead policy was non-deterministic because it iterated over a map to build its test cases. This caused intermittent CI failures when the test would fail to trigger a necessary panic. This change refactors the test's helper to accept a variadic slice of queues instead of a map. This guarantees a deterministic iteration order, making the test reliable.
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Hi @LukeAVanDrie. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. Instructions 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. |
/ok-to-test |
/lgtm Thanks Luke! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kfswain, LukeAVanDrie The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The test for the BestHead policy was non-deterministic because it iterated over a map to build its test cases. This caused intermittent CI failures when the test would fail to trigger a necessary panic. This change refactors the test's helper to accept a variadic slice of queues instead of a map. This guarantees a deterministic iteration order, making the test reliable.
This PR fixes a flaky test in the BestHead dispatch policy.
Problem:
The test was non-deterministic because it iterated over a map to build its test cases. This caused intermittent CI failures when the test's iteration order would fail to trigger a necessary panic.
Solution:
This change refactors the test's helper (
newTestBand
) to accept a variadic slice of queues instead of a map. This guarantees a deterministic iteration order, making the test reliable.I introduced this flake during the refactor in #1202. Apologies!
This tracks #674