Skip to content

Commit c6f92fd

Browse files
authored
Fix flaky tests (backport #1559) (#1566)
Wait for controller to become active Otherwise there is a race condition between sending the program and starting the tests.
1 parent 13b4e4f commit c6f92fd

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ur_robot_driver/test/integration_test_scaled_joint_controller.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ def setUp(self):
9797
time.sleep(1)
9898
self.assertTrue(self._io_status_controller_interface.resend_robot_program().success)
9999

100+
self._controller_manager_interface.wait_for_controller(
101+
"scaled_joint_trajectory_controller", "active"
102+
)
103+
100104
#
101105
# Test functions
102106
#

ur_robot_driver/test/integration_test_trajectory_until.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,13 @@ def init_robot(self):
9595

9696
self._controller_manager_interface.wait_for_controller("tool_contact_controller")
9797

98-
def setUp(self):
98+
def setUp(self, initial_joint_controller):
9999
self._dashboard_interface.start_robot()
100100
time.sleep(1)
101101
self.assertTrue(self._io_status_controller_interface.resend_robot_program().success)
102102

103+
self._controller_manager_interface.wait_for_controller(initial_joint_controller, "active")
104+
103105
#
104106
# Tests
105107
#

0 commit comments

Comments
 (0)