Skip to content

Wait for target robot mode when switching modes - #611

Open
urfeex wants to merge 1 commit into
UniversalRobots:masterfrom
urfeex:fix_dashboard_x_test
Open

urfeex wants to merge 1 commit into
UniversalRobots:masterfrom
urfeex:fix_dashboard_x_test

Conversation

@urfeex

@urfeex urfeex commented Nov 2, 2026

Copy link
Copy Markdown
Member

This should reduce flakiness of tests. AFAIK that behavior has been fixed on newer PolyScope versions, such that setting a robot mode blocks until the robot mode is actually reached. In that case, checking should not harm.

This is an attempt to fix the flaky test in https://github.com/UniversalRobots/Universal_Robots_Client_Library/actions/runs/41455435440/job/125316669824

This should reduce flakiness of tests. AFAIK that behavior has been
fixed on newer PolyScope versions, such that setting a robot mode blocks
until the robot mode is actually reached. In that case, checking should
not harm.
@urfeex
urfeex requested a review from a team November 2, 2026 15:32
@urfeex urfeex added the CI label Nov 2, 2026
Copilot AI balanced review requested due to automatic review settings November 2, 2026 15:32
@cursor

cursor Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only synchronization changes with no production code or security impact.

Overview
program_interaction now waits for the expected robot mode via the primary client after dashboard power/brake commands, matching power_cycle and other remote-control tests.

After commandPowerOff, commandPowerOn, and commandBrakeRelease, the test calls waitForRobotMode for POWER_OFF, IDLE, and RUNNING instead of relying on an 800 ms sleep after brake release. The goal is to reduce CI flakiness when PolyScope has not finished transitioning before commandPlay and program-state checks run.

Reviewed by Cursor Bugbot for commit 7d6e87a. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.80%. Comparing base (1d02960) to head (7d6e87a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #611      +/-   ##
==========================================
+ Coverage   83.77%   83.80%   +0.03%     
==========================================
  Files         127      127              
  Lines        8388     8386       -2     
  Branches     3829     3829              
==========================================
+ Hits         7027     7028       +1     
+ Misses        954      952       -2     
+ Partials      407      406       -1     
Flag Coverage Δ
python_scripts 49.69% <ø> (ø)
start_ursim 91.31% <ø> (-0.61%) ⬇️
unit 61.62% <ø> (+0.01%) ⬆️
ur20-latest 81.05% <ø> (+0.02%) ⬆️
ur5-3.14.3 80.79% <ø> (ø)
ur5e-10.11.0 76.62% <ø> (+0.05%) ⬆️
ur5e-10.12.0 77.63% <ø> (+0.01%) ⬆️
ur5e-10.7.0 76.09% <ø> (-0.02%) ⬇️
ur5e-5.9.4 81.06% <ø> (?)
ur7e-10.13.0 78.13% <ø> (-0.11%) ⬇️
ur7e-10.14.0 78.47% <ø> (ø)

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 remain for the robot-mode synchronization changes.

No open issues 🎉

What changed in this PR

This PR aims to reduce flakiness in the dashboard client’s program-interaction test by waiting for robot mode transitions to complete before proceeding.

Changes:

  • Wait for POWER_OFF and IDLE after the corresponding power commands.
  • Replace the fixed 800 ms delay after brake release with a wait for RUNNING.
File Description
tests/​test_dashboard_client_x.cpp Add explicit robot-mode waits to synchronize the program-interaction test.

Review effort: Balanced

@mergify

mergify Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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