Repository navigation
test(cli): keep the delegate queue test children alive across the second delegate - #628
Merged
Merged
Conversation
…ond delegate The two queue tests started their first child with a stand-in that exits at once. On a slow runner it was gone (a zombie, which counts as dead) before the second delegate, so recovery freed the slot and the second child started instead of queueing. Their children now live 1 s, so the first is still running when the second is delegated. Test-only change.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
12 tasks done
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
A test-only fix for a flaky test on
develop. The two delegate queue tests now start children that live 1 s instead of exiting at once. No production code changes.Why
CI on #626 failed in
delegate::tests::the_machine_guard_queues_and_a_poll_starts_the_queued_child(queuedwasnullinstead oftrue), and every PR can hit it until the fix is ondevelop.Both queue tests (that one and
a_new_delegate_never_starts_ahead_of_an_older_queued_one) run withmax_live_processes = 1and start the first child with a stand-in binary that exits immediately. On a slow runner the first child is gone before the seconddelegate. An exited, unreaped child counts as gone (#623), so recovery frees its slot and the second child starts instead of queueing.The same change is in #627, which is still in review; when #627 merges, git sees the same lines.
Changes
crates/tole-cli/src/delegate_tests.rs: both queue tests build their host withhost(&root, 1, …), so each stand-in child sleeps 1 s and the first is still running when the second is delegated. 2 lines.Testing
delegate(what a slow runner does), the old short-lived children failed 10 runs out of 10. With the 1 s children and the same pause, 0 out of 10 failed.CARGO_TARGET_DIR,CARGO_INCREMENTAL=0):cargo fmt --all --check: cleancargo clippy --workspace --all-targets -- -D warnings: cleancargo test --workspace --no-fail-fast: 1509 passed, 0 failedcargo test -p tole-core --no-default-features: 511 passed, 0 failedcora review --no-llm --staged: no issues found