Repository navigation
Fix flaky firmware cancel test - #37
Merged
Merged
Conversation
TestSignFirmwareCancelledRemovesTempFiles allowed 3s from the start of signing. Under load, starting the fwup stub alone took up to 3.1s, while signing always returned about 500ms (WaitDelay) after the cancel. So the test failed on busy machines without anything being wrong. It now times only from the cancel to signing returning. The stub's child sleeps 30s instead of 5s, so waiting on it still fails clearly, and it is killed when the test ends. The poll for fwup starting waits up to 20s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
TestSignFirmwareCancelledRemovesTempFilessometimes failed with "cancelling took 4.2s" when the machine was busy, for example when running the race tests for all packages.The test allowed 3 seconds from the start of signing. That time included starting the fwup stub, which took up to 3.1 seconds under load. Signing itself always returned about 500ms after the cancel, which is the
WaitDelay. So the code was fine, and the test was timing the wrong thing.The test now times only from the cancel to signing returning. The stub's child process now sleeps 30 seconds instead of 5, so a missing
WaitDelaystill fails clearly. The test kills that child when it ends. It also waits up to 20 seconds for fwup to start, up from 5.I checked that the test still fails without
WaitDelay: signing then takes 30 seconds to return.🤖 Generated with Claude Code