Fix launch fixture setup hanging before readiness - #1009
Open
Shubham-Padkonde wants to merge 1 commit into
Open
Shubham-Padkonde wants to merge 1 commit into
Shubham-Padkonde wants to merge 1 commit into
Conversation
Signed-off-by: Shubham Padkonde <shubhampadkonde12@gmail.com>
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.
Description
When a launch fixture cannot load an included file,
launch_pytestkeeps waiting forReadyToTestafter launch has failed. This can hang the test runner indefinitely. A conditional group that skips its readiness action has the same problem when the launch becomes idle.Wake fixture setup on either readiness or launch-service completion, and report a setup error if the service finishes first. Use a plain future: an extra waiting task would itself keep
LaunchService._is_idle()false. Existing successful and delayed readiness still allow the tests to run.Fixes #732 (the original fixture setup failure; does not change handling of individual node exits after readiness).
Is this user-facing behavior change?
A launch service that finishes before readiness now produces
launch service stopped before ReadyToTestinstead of leaving fixture setup waiting indefinitely. The original launch error is still logged.Did you use Generative AI?
Yes. OpenAI Codex (GPT-6) assisted with investigation, implementation, regression tests, validation, and this description.
Additional Information
Validated on Linux/WSL, Python 3.12.13 and pytest 8.4.2:
launch_pytestfunctional tests pass after the fix, including the existing example integration tests.LaunchService.run_asyncwarning. Existing process-tool tests emit event-loop warnings.xmllint; no XML files changed. A full ROS installation, other platforms, and tests of other ROS packages were not run.