Repository navigation
test: fire interrupt tests from an event, not a sleep - #278
Closed
noahkhomer18 wants to merge 1 commit into
Closed
noahkhomer18 wants to merge 1 commit into
noahkhomer18 wants to merge 1 commit into
Conversation
Both interrupt tests decided when to interrupt with a fixed wall-clock sleep. A slow or loaded runner could finish the scan first, which is the flake class this repo has been clearing out. Interrupts now fire from an interruptWriter that triggers on the Nth stdout line, so the signal lands while the scan is genuinely running. No time.Sleep decides the interrupt in either file. Closes TMHSDigital#260
Author
|
Closing this: |
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.
Closes #260.
Both interrupt tests decided when to interrupt with a fixed wall-clock sleep, so a slow or loaded runner could finish the scan before the signal landed. That is the flake class this repo has been clearing out.
Interrupts now fire from an
interruptWriterthat triggers on the Nth stdout line, so the signal lands while the scan is genuinely running.main_e2e_test.go:TestE2EResumefiresos.Interruptafter the 3rd result line, replacing the 1s sleep.main_signal_unix_test.go:TestE2ESIGTERMExits143fires SIGTERM after the 1st result line, replacing the 200ms sleep.Acceptance criterion met: no
time.Sleepdecides when the interrupt fires in either file.One honest note:
main_signal_unix_test.gocarries a//go:build unixtag, so on this Windows machine I could not execute that test. It was changed by reading it and mirrors the pattern proven inTestE2EResume; CI on Linux will be the first real run of it.