Skip to content

Commit 32cf968

Browse files
authored
Fix flaky tests (#1559)
Wait for controller to become active Otherwise there is a race condition between sending the program ans starting the tests.
1 parent efbdeab commit 32cf968

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
@@ -96,11 +96,13 @@ def init_robot(self):
9696

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

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

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

0 commit comments

Comments
 (0)