Watch: make the open-done wait test independent of scheduler delays #4629
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4629"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tyr0nsur on 2026-12-01T00:17:58Z.
What it changes
The cooperative-yield case of
watch::ask_holds::wait_open_done_covers_immediate_fast_spin_yield_cleared_and_timeoutexpects the sixthis_donepoll to returnDonebefore 10 ms of real time elapse. A scheduling delay during the cooperative phase can make that same poll sequence returnTimedOut. This was reported on main in #4379 and happened again in the Windows check for #4595.The test now advances a controlled clock, checks that the immediate and fast-spin paths read no clock, and covers completion, clearing and the exact deadline. Production passes
Instant::nowand retains the same poll order, budget and cooperative yields.How it was tested
TimedOutinstead ofDonewith a simulated 20 ms scheduling pause in the first cooperative poll.cargo test --locked -p victory-gpu --lib: 1133 passed, 66 ignored.cargo clippy --locked -p victory-gpu --all-targets -- -D warningspassed. Staged asset policy passed.Checked for overlap
watch.rs. Related: #2814 introduced the wait, #4379 reports the flake, and #4619 addresses a separate watch test involving the shared journal. I found no open PR changing this test or helper to control the clock.Reviewed with Claude Code (Opus 5.5).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.