Repository navigation
test: wait for conditions instead of fixed sleeps, shared wait_until helper - #823
Merged
Merged
Conversation
…helper (#812) Adds wait_until/wait_for (60 s bound, polls) next to TestDir in the test support modules and converts sleep-then-assert tests and ad-hoc deadline loops to them. CONTRIBUTING gets the rule.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Nov 15, 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.
What
Adds
wait_until/wait_for(polling, 60 s bound) next toTestDirin the tole-core and tole-cli test support, and converts the sleep-then-assert tests and hand-written deadline loops to them.Why
Fixed sleeps are the root of the flaky tests in #702, #712 and #738 and of
delegated_approval_e2e::no_answer_is_a_denial(comment on #812): they pass on a free machine and fail on a loaded one.Changes
wait_until/wait_forwith tests (test_dir_helper).children/agents.rs,jobs.rs, sandbox, mcp and e2e tests; tole-clidelegate_tests.rs(theWAIT_TICKSconstant is gone),discuss/tool_tests.rs, serve, cancel, sibling-notice, writer-lock and TUI e2e tests.docs/epics.md: one line.Testing
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings, fullcargo test --workspacepass; the full run pinned to one CPU passed before the merge with develop.sibling_notice_e2e,serve_session_cancel,acp_session_cancel,writer_lock_e2e: 0 failures either way. Further stress:skill_approval_e2e200 runs,session_effort_e2e60,wire_size_missions60: 0 failures.clippy --all-targetsunder--no-default-features --features shell-toolsfails on an unusedmutintests/owner_only_e2e.rs:84(not in this diff; CI's no-mcp job passes).Part of #812