Skip to content

Commit c5e2d75

Browse files
committed
fix: poll for fault-manager operations in sensor and moveit smoke tests
Same race condition as turtlebot3 - fault_manager ROS 2 services may not be discovered by the first runtime refresh cycle. Use poll_until with 30s timeout consistently across all demos.
1 parent 86c9c6e commit c5e2d75

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

tests/smoke_test.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ fi
6060

6161
section "Operations"
6262

63-
assert_non_empty_items "/apps/medkit-fault-manager/operations"
63+
# fault_manager services may take extra time to be discovered via runtime graph introspection
64+
echo " Waiting for fault-manager operations to appear (max 30s)..."
65+
if poll_until "/apps/medkit-fault-manager/operations" '.items | length > 0' 30; then
66+
pass "GET /apps/medkit-fault-manager/operations returns non-empty items"
67+
else
68+
fail "GET /apps/medkit-fault-manager/operations returns non-empty items" "items still empty after 30s"
69+
fi
6470

6571
section "Scripts"
6672

tests/smoke_test_moveit.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ assert_non_empty_items "/apps/medkit-gateway/data"
5151

5252
section "Operations"
5353

54-
assert_non_empty_items "/apps/medkit-fault-manager/operations"
54+
# fault_manager services may take extra time to be discovered via runtime graph introspection
55+
echo " Waiting for fault-manager operations to appear (max 30s)..."
56+
if poll_until "/apps/medkit-fault-manager/operations" '.items | length > 0' 30; then
57+
pass "GET /apps/medkit-fault-manager/operations returns non-empty items"
58+
else
59+
fail "GET /apps/medkit-fault-manager/operations returns non-empty items" "items still empty after 30s"
60+
fi
5561

5662
section "Configurations"
5763

0 commit comments

Comments
 (0)