Add explicit timeout to Eventually assertions in reconciler tests#1020
Merged
makkes merged 1 commit intofluxcd:mainfrom Mar 25, 2026
Merged
Add explicit timeout to Eventually assertions in reconciler tests#1020makkes merged 1 commit intofluxcd:mainfrom
makkes merged 1 commit intofluxcd:mainfrom
Conversation
Six Eventually calls in the reconciler tests were missing an explicit timeout, falling back to gomega default of 1 second. This caused flaky failures when the reconciliation loop took slightly longer than 1 second, as the ObservedGeneration would not yet be updated. All other Eventually calls in the same file already use the 10-second timeout constant defined at the top of the file. Fixes: fluxcd#899 Signed-off-by: Istvan Csaba Varga <istvan.csaba.varga@accenture.com>
Member
|
Looks good to me, I'll run the tests locally to verify. |
Member
|
I'm not able to repro the original failure but this change should make it happen less often, anyway, so let's merge it. |
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.
Fixes #899
Six
Eventuallycalls in the reconciler tests were missing an explicit timeout, falling back to gomega's default of 1 second. This caused flaky failures when the reconciliation loop took slightly longer, asObservedGenerationwould still be -1 instead of the expected 1.All other
Eventuallycalls in the same file already use the 10-secondtimeoutconstant. This adds it to the 6 missing ones.Confirmed the flaky failure reproduces without the fix (
push updatesubtest, line 520) and the full suite passes with it.