fix: stop the catalog-failure test racing its own deadline - #21
Merged
Conversation
TestConfigSetCatalogFailurePreservesConfig installs a fake catalog that fails immediately, then imposed a 10ms deadline on the command. Two outcomes raced: the fake's error, which exits 9, and the deadline, which exits 7. On a loaded macOS runner the deadline won, so CI went red on main while the same commit had passed macOS twice in the pull request runs. The assertion itself was sound throughout: the config was preserved, only the exit code differed. The short deadline bought nothing, because the fake never blocks. Removing it leaves the test just as fast and records why, so it is not added back. The 1ms timeouts in doctor_test.go and models_test.go are the opposite case and stay: their fakes block on the context, so the deadline is what those tests assert.
Merged
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.
TestConfigSetCatalogFailurePreservesConfig installs a fake catalog that
fails immediately, then imposed a 10ms deadline on the command. Two
outcomes raced: the fake's error, which exits 9, and the deadline, which
exits 7. On a loaded macOS runner the deadline won, so CI went red on
main while the same commit had passed macOS twice in the pull request
runs. The assertion itself was sound throughout: the config was
preserved, only the exit code differed.
The short deadline bought nothing, because the fake never blocks.
Removing it leaves the test just as fast and records why, so it is not
added back. The 1ms timeouts in doctor_test.go and models_test.go are
the opposite case and stay: their fakes block on the context, so the
deadline is what those tests assert.