Repository navigation
test: wait for the end state in four timing-sensitive tests - #430
Merged
Merged
Conversation
The HiDPI window test waits for the expanded frame, the export test and the Chrome profile test wait for killed processes to end, and the takeover drain test checks that the grant follows the sample instead of a fixed 40 ms window.
This was referenced Oct 29, 2026
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.
Four tests checked a state once, at a moment when the system could still be on its way there. Each now waits for the end state, or checks an order instead of a fixed window.
scales_with_the_host_scale_factor(#408) waited for the expanded window size, then took one screenshot, which could still show the thumbnail frame. A newScreen::wait_colorwaits until the bar color shows at the probe point and returns that frame. The 1x expand test in the same file had the same pattern and uses it too.The evidence export kill test (#412) read
/proc/<pid>/statof the killed descendant once.killreturns before the kernel ends the target, so the test now polls for up to 5 s. The 2.5 s settle assertion is unchanged.The Chrome profile crash test (#420) waited only for the browser's leader process. The profile claim counts the whole process group, so the test now waits until the group is gone. The check that a live owner refuses the profile is unchanged.
The in-flight observation drain test (#423) slept 40 ms and expected the lease to be still waiting. A desktop wait cancels its sample when it sees a lease (
TAKEOVER_POLL_MS), so a grant inside that window is correct behavior. The fake capture tools now record their pid, and the test checks that the sample had ended when the lease was granted. All eight transport and kind cases stay.Closes #408
Closes #412
Closes #420
Closes #423
408/before.txt,408/after.txt412/before-*.log,412/after-*.logPICKFORGE_REQUIRE_BROWSER=1420/run1.txt423/mutant-no-drain.txt,423/loop-cpu0.txtThere is no QA pass: the change touches tests only. Evidence is in
~/.pickforge/investigations/under 408, 412, 420, 423 andflakes/.Checks on 86f30aa: oxlint, typecheck,
cargo fmt --checkand clippy with-D warnings; the full vitest coverage run with the desktop, window, wait, browser and viewer requirements on (191 files, 3419 passed, 4 skipped);PICKFORGE_REQUIRE_XVFB=1 cargo test --workspace --locked(328 passed). PickCheck 0.4.0 against main is clean. Sol reviewed the diff with no findings (9/10, pending the full suites, which then passed).