test(shell): widen background completion wait#2528
Draft
cyq1017 wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a constant BACKGROUND_COMPLETION_WAIT_MS set to 30,000 milliseconds in the shell tool tests, replacing hardcoded 5,000 millisecond timeouts in test_background_execution and test_completed_background_shell_releases_process_handles to allow more time for background tasks to complete. There are no review comments, and I have no feedback to provide.
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.
Problem
Change
Verification
Refs #2525
Refs #2526
Greptile Summary
This PR widens the completion-wait timeout used in two background shell tests from 5 s to a named constant
BACKGROUND_COMPLETION_WAIT_MS(30 s) to fix recurring Windows CI flakiness where the shell was still reported asRunningwhen the 5 s window expired.const BACKGROUND_COMPLETION_WAIT_MS: u64 = 30_000and applies it totest_background_executionandtest_completed_background_shell_releases_process_handles, replacing magic literals with a self-documenting name.Confidence Score: 5/5
Safe to merge — changes are confined to test infrastructure with no production code touched.
The change replaces two hardcoded 5 s magic-number timeouts with a single named 30 s constant in test code only. Both affected tests exercise lightweight commands (echo and sleep 1 && echo) whose actual runtime is well under 30 s even on slow Windows runners, so the wider window eliminates the flakiness without making the tests meaninglessly long. No shell manager or runtime logic is modified.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Start background shell command] --> B[execute returns ShellStatus::Running] B --> C{Wait for completion\nup to BACKGROUND_COMPLETION_WAIT_MS\n30 000 ms} C -- completed in time --> D[Assert ShellStatus::Completed] C -- timed out --> E[Test fails: still Running] D --> F[Assert expected output / handle cleanup]Reviews (1): Last reviewed commit: "test(shell): widen background completion..." | Re-trigger Greptile