Repository navigation
test(doctor): forward the caller's clock into doctor --live - #465
Merged
Merged
Conversation
runDoctor destructured its seams without `now` and `delay`, so a test's injected clock never reached runLiveProbes and --live timed its probe removals on the real clock. The pinned docker canary output carries "in 0 ms and 0 ms", which read "1 ms" whenever a fake removal took a millisecond under load: the pin failed about one run in six on CI and locally with parallel suites. runDoctor now forwards both to the --live seams. Twelve parallel runs of doctor.test.mjs: 12 green with the forward, 1 red of 12 without it. Signed-off-by: Rob Boerman <robboerman@live.nl>
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.
The pinned docker canary output in
worker/test/doctor.test.mjs("docker's egress canary prints and spawns exactly what it did...", #431) failed about one run in six under load, on CI and locally: it pins "in 0 ms and 0 ms", and the measurement read "1 ms".Root cause:
runDoctordestructured its seams withoutnowanddelay, so the test's injected clock never reachedrunLiveProbes, and--livetimed its probe removals on the real clock.runDoctornow forwards both to the--liveseams. No production behaviour changes: production passes neither, and the real clock is the default.Twelve parallel runs of
doctor.test.mjs: 12 green with the forward, 1 red of 12 without it.This unblocks the open round PRs, whose required check hit this flake.