Skip to content

test(rtps): give action_goal_flood's get_result room before goals retire - #930

Merged
finger563 merged 1 commit into
mainfrom
fix/rtps-goal-flood-race
Nov 27, 2026
Merged

finger563 merged 1 commit into
mainfrom
fix/rtps-goal-flood-race

Conversation

@finger563

Copy link
Copy Markdown
Contributor

Description

action_goal_flood failed once in the Humble interop job, on #929, which doesn't touch rtps. It printed FAIL: get_result right after: CANCELED, and a rerun passed.

Step 3 cancels the three running goals, waits until their execute callbacks have finished, then calls get_result for one of them and expects CANCELED. The server retires a finished goal result_timeout after it ends, and the test set that to 300 ms. When the get_result request reaches the server later than that, for example on a loaded runner or after a retransmit, the goal is already gone and the reply is UNKNOWN.

Changes, only in pc/tests/rtps_action_goal_flood.cpp:

  • result_timeout is now 2 s instead of 300 ms.
  • Step 4, which checks that the goal has been retired, now waits 3 s instead of 1 s. The test takes about 2 s longer.
  • When step 3 fails, the test prints the status get_result returned.

Verification

  • New test: 10/10 passes locally (macOS, Release build of lib + pc, as run_interop.sh builds it).
  • Cause confirmed: with the old 300 ms and a 400 ms delay before step 3's get_result, the test fails exactly as in CI: get_result status: 0 (UNKNOWN), then FAIL: get_result right after: CANCELED.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DFjjnq3XCTRAXENSxsCxJU

Step 3 cancels the three goals and asks get_result for one of them right
away, expecting CANCELED. The server retires a finished goal result_timeout
after it terminated, and the test set that to 300 ms, so a get_result that
reached the server later than that (a loaded CI runner, a retransmitted
request) found the goal already retired and got UNKNOWN. The Humble interop
job failed that way once.

Use a 2 s result_timeout, wait 3 s before step 4 checks that the goal was
retired, and print the status get_result returned when step 3 fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DFjjnq3XCTRAXENSxsCxJU
@github-actions

Copy link
Copy Markdown

✅Static analysis result - no issues found! ✅

@finger563
finger563 merged commit 5343606 into main Nov 27, 2026
19 checks passed
@finger563
finger563 deleted the fix/rtps-goal-flood-race branch November 27, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant