test(hiroz-tests): signal-based producer guard + graph-poll waits (hu stack 4/9) - #235
Merged
Conversation
YuanYuYuan
force-pushed
the
dev/pr-hu-1c-core
branch
from
July 24, 2026 23:40
341cc00 to
e00a49e
Compare
YuanYuYuan
force-pushed
the
dev/pr-hu-1d-test-harness
branch
from
July 24, 2026 23:40
a562112 to
fab6f4e
Compare
YuanYuYuan
force-pushed
the
dev/pr-hu-1c-core
branch
from
July 25, 2026 00:03
e00a49e to
8622619
Compare
YuanYuYuan
force-pushed
the
dev/pr-hu-1d-test-harness
branch
from
July 25, 2026 00:03
fab6f4e to
95d5551
Compare
YuanYuYuan
force-pushed
the
dev/pr-hu-1c-core
branch
from
July 25, 2026 13:05
8622619 to
1cc75fd
Compare
YuanYuYuan
force-pushed
the
dev/pr-hu-1d-test-harness
branch
from
July 25, 2026 13:05
95d5551 to
3132da3
Compare
YuanYuYuan
force-pushed
the
dev/pr-hu-1c-core
branch
from
July 25, 2026 13:28
1cc75fd to
9013842
Compare
YuanYuYuan
force-pushed
the
dev/pr-hu-1d-test-harness
branch
from
July 25, 2026 13:28
3132da3 to
21e6cf8
Compare
YuanYuYuan
force-pushed
the
dev/pr-hu-1c-core
branch
from
July 26, 2026 13:38
9013842 to
f414ca7
Compare
YuanYuYuan
force-pushed
the
dev/pr-hu-1d-test-harness
branch
from
July 26, 2026 13:38
21e6cf8 to
f90ff1b
Compare
YuanYuYuan
force-pushed
the
dev/pr-hu-1c-core
branch
from
July 26, 2026 17:14
f414ca7 to
48d6945
Compare
YuanYuYuan
force-pushed
the
dev/pr-hu-1d-test-harness
branch
from
July 26, 2026 17:14
f90ff1b to
e4a953c
Compare
YuanYuYuan
force-pushed
the
dev/pr-hu-1c-core
branch
2 times, most recently
from
July 27, 2026 15:08
7ef9067 to
2368c77
Compare
Reusable integration-test harness improvements, independent of any hu plugin: - ProducerGuard / spawn_producer / spawn_holder: hold a background producer node for exactly the test scope and tear it down via an atomic stop flag on drop (no fixed sleeps, no thread join that can hang on a blocked recv loop). - TestRouter gains a readiness poll (connect-probe + short settle) so tests wait for the router to actually accept connections instead of racing it. - parameter_interop waits on hiroz's own graph (create_hiroz_context_with_router) instead of spawning ros2 node list in a loop. All new helpers carry the file's existing per-item #[allow(dead_code)] so binaries that don't use a given helper still lint clean.
…aim, fix teardown hang Addresses Copilot review on the test-harness PR: - ProducerGuard doc now says the thread is detached on drop (not joined), matching the impl. - demo_nodes comment no longer claims an rcl-interop nextest test-group in .config/nextest.toml (only default/interop profiles exist there). - the RCL add_two_ints error path now kills the server before joining the stdout/stderr reader threads, so an alive-but-slow server can't hang the read_to_string join that this very diagnostic path exists to report.
Use TcpStream::connect_timeout for the router readiness probe so each attempt honors the 50ms budget, and clamp the add_two_ints retry loop so a slow attempt can't run past nextest's 60s kill.
…ents - take the child out of ProcessGuard before manually reaping the add_two_ints server so Drop can't re-signal a recycled PID group - null the RCL client's stdout: nothing reads it and a full pipe would block the new try_wait exit loop - correct comments claiming a 60s nextest kill — the interop profile terminates after 2x60s = 120s - ProducerGuard doc: teardown is best-effort (detach, not join)
…n waits Add wait_for_ros_node — polls the graph until a named ROS node is discoverable, bounded by a timeout backstop — and use it in place of the fixed wait_for_ready sleeps that precede interacting with a just-spawned RCL node (talker, listener, add_two_ints_server, fibonacci_action_server). The success path is now deterministic: it proceeds the moment the node appears rather than always sleeping a fixed time, and only falls back to the backstop on genuine failure (the following operation carries its own discovery timeout regardless).
YuanYuYuan
force-pushed
the
dev/pr-hu-1d-test-harness
branch
from
July 27, 2026 16:20
e4a953c to
00a3ac2
Compare
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.
Summary
Hardens the RCL/rclcpp interop test harness against discovery-latency flakes on loaded self-hosted runners: replaces blind fixed sleeps with condition-driven waits (graph discovery, process exit) and adds diagnostics that separate alive-but-slow from exited-early failures. Also adds a background-producer guard used by the hu-meter/hu-monitor suites later in the stack.
Key changes
wait_for_ros_nodepolls the graph until a named ROS node is discoverable (backstop-bounded) and replaces the fixedwait_for_readysleeps before interacting with a just-spawned RCL node (talker,listener,add_two_ints_server,fibonacci_action_server): it proceeds the moment the node appears.TestRouterstartup polls the router's TCP listener (40 × 50ms) instead of a blind 500ms sleep;parameter_interop::wait_for_nodepolls the in-memory graph (20ms) instead of shelling out toros2 node list.demo_nodes.rs) — retry client/action attempts against a discovery deadline kept well under the interop profile's 120s kill (= 60s period × terminate-after 2); pipe RCL-server output to tell alive-but-slow from exited/errored; bound on the client's actual exit and require exit success; take manually-killed children out of theirProcessGuardsoDropcan't re-signal a recycled PID group.ProducerGuard(common/mod.rs) —spawn_producer/spawn_holderhold Zenoh entities for a guard's lifetime, detaching on drop (best-effort, no join) to avoid session-teardown hangs and to surface early-exit panics. Consumed by the hu-meter/hu-monitor tests later in the stack.Breaking changes
None (test-only).