Skip to content

fix: stop the catalog-failure test racing its own deadline - #21

Merged
arasovic merged 1 commit into
mainfrom
fix/config-test-timeout-race
Aug 17, 2026
Merged

fix: stop the catalog-failure test racing its own deadline#21
arasovic merged 1 commit into
mainfrom
fix/config-test-timeout-race

Conversation

@arasovic

Copy link
Copy Markdown
Owner

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.

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.
@arasovic
arasovic merged commit 270c447 into main Aug 17, 2026
13 checks passed
@arasovic
arasovic deleted the fix/config-test-timeout-race branch August 17, 2026 12:14
@arasovic arasovic mentioned this pull request Aug 22, 2026
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.

1 participant