Skip to content

Allow more time for the trajectory cancel result in the spline test - #629

Merged
urfeex merged 1 commit into
UniversalRobots:masterfrom
urrsk:spline_cancel_wait
Nov 19, 2026
Merged

urfeex merged 1 commit into
UniversalRobots:masterfrom
urrsk:spline_cancel_wait

Conversation

@urrsk

@urrsk urrsk commented Nov 18, 2026

Copy link
Copy Markdown
Member

cancel_trajectory_while_being_executed_and_sending_new_one waits 500 ms for
TRAJECTORY_RESULT_CANCELED. Before it answers, the control script drains the
unread trajectory points, 10 per control cycle on CB3. With the 500 points the
test queues, that alone is ~392 ms of controller time.

In GitHub CI URSim 3.14.3 runs at ~97 % of real time, so the result arrives after
~405 ms and the test passes with less than 100 ms margin. On a host where URSim runs
at ~91 % of real time, both _urcap and _headless fail every time, and the
result is logged ~100 ms after the wait gave up.

This raises the two waits after TRAJECTORY_CANCEL in that test to 2 s. The wait
returns as soon as the result arrives, so passing runs take no longer.

Tested against URSim CB3 3.14.3 on a slow VM: failing before, passing after.

Give the cancel result more time to arrive so the test still passes when
draining the queued points takes most of the previous timeout.
Copilot AI balanced review requested due to automatic review settings November 18, 2026 13:26
@mergify

mergify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.83%. Comparing base (4151909) to head (30a28e4).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #629      +/-   ##
==========================================
- Coverage   83.84%   83.83%   -0.01%     
==========================================
  Files         127      127              
  Lines        8560     8561       +1     
  Branches     3913     3913              
==========================================
  Hits         7177     7177              
  Misses        970      970              
- Partials      413      414       +1     
Flag Coverage Δ
python_scripts 49.69% <ø> (ø)
start_ursim 88.60% <ø> (-0.99%) ⬇️
unit 64.07% <ø> (-0.02%) ⬇️
ur20-latest 81.50% <ø> (-0.03%) ⬇️
ur5-3.14.3 81.28% <ø> (+0.07%) ⬆️
ur5e-10.11.0 77.02% <ø> (ø)
ur5e-10.12.0 77.96% <ø> (-0.08%) ⬇️
ur5e-10.7.0 76.58% <ø> (-0.06%) ⬇️
ur5e-5.9.4 81.40% <ø> (-0.09%) ⬇️
ur7e-10.13.0 78.38% <ø> (-0.02%) ⬇️
ur7e-10.14.0 78.69% <ø> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the cancellation-timeout adjustment.

No open issues 🎉

What changed in this PR

This PR makes the spline trajectory-cancellation test more tolerant of slower URSim execution by allowing more time for the controller to report cancellation.

Changes:

  • Increases both post-cancellation waits from 500 ms to 2 s; waits still return as soon as the result arrives.
  • Adds a comment explaining the controller time needed to drain unread trajectory points on CB3.
File Description
tests/​test_spline_interpolation.cpp Extends cancellation-result timeouts and documents the buffer-draining delay.

Review effort: Balanced

@urrsk
urrsk marked this pull request as draft November 18, 2026 13:32
@urrsk
urrsk requested a balanced review from Copilot November 18, 2026 13:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the timeout adjustment intended to reduce timing-related cancellation test failures on slower URSim hosts.

No open issues 🎉

Review effort: Balanced

@urrsk
urrsk marked this pull request as ready for review November 18, 2026 14:04
@urrsk
urrsk requested a review from a team November 18, 2026 14:04
@urrsk urrsk added the CI label Nov 18, 2026
@urfeex
urfeex merged commit 6172363 into UniversalRobots:master Nov 19, 2026
55 of 66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants