Skip to content

Commit

Permalink
Change the order of tests to fix timing issues (#498) (#501)
Browse files Browse the repository at this point in the history
(cherry picked from commit 60c130a)

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
  • Loading branch information
mergify[bot] and christophfroehlich authored Feb 12, 2025
1 parent 7bcf99f commit 347c8d4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
10 changes: 4 additions & 6 deletions gz_ros2_control_tests/tests/effort_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ def test_clock(self):
with WaitForTopics(topic_list, timeout=10.0):
print('/clock is receiving messages!')

def test_controller_running(self, proc_output):

cnames = ['joint_trajectory_controller', 'joint_state_broadcaster']

check_controllers_running(self.node, cnames)

def test_check_if_msgs_published(self):
check_if_js_published(
'/joint_states',
Expand All @@ -101,6 +95,10 @@ def test_check_if_msgs_published(self):

def test_arm(self, launch_service, proc_info, proc_output):

# Check if the controllers are running
cnames = ['joint_trajectory_controller', 'joint_state_broadcaster']
check_controllers_running(self.node, cnames)

proc_action = Node(
package='gz_ros2_control_demos',
executable='example_effort',
Expand Down
10 changes: 4 additions & 6 deletions gz_ros2_control_tests/tests/position_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ def test_clock(self):
with WaitForTopics(topic_list, timeout=10.0):
print('/clock is receiving messages!')

def test_controller_running(self, proc_output):

cnames = ['joint_trajectory_controller', 'joint_state_broadcaster']

check_controllers_running(self.node, cnames)

def test_check_if_msgs_published(self):
check_if_js_published(
'/joint_states',
Expand All @@ -101,6 +95,10 @@ def test_check_if_msgs_published(self):

def test_arm(self, launch_service, proc_info, proc_output):

# Check if the controllers are running
cnames = ['joint_trajectory_controller', 'joint_state_broadcaster']
check_controllers_running(self.node, cnames)

proc_action = Node(
package='gz_ros2_control_demos',
executable='example_position',
Expand Down
18 changes: 8 additions & 10 deletions gz_ros2_control_tests/tests/velocity_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,6 @@ def test_clock(self):
with WaitForTopics(topic_list, timeout=10.0):
print('/clock is receiving messages!')

def test_controller_running(self, proc_output):

cnames = [
'joint_trajectory_controller',
'joint_state_broadcaster',
'imu_sensor_broadcaster'
]

check_controllers_running(self.node, cnames)

def test_check_if_msgs_published(self):
check_if_js_published(
'/joint_states',
Expand All @@ -105,6 +95,14 @@ def test_check_if_msgs_published(self):

def test_arm(self, launch_service, proc_info, proc_output):

# Check if the controllers are running
cnames = [
'joint_trajectory_controller',
'joint_state_broadcaster',
'imu_sensor_broadcaster'
]
check_controllers_running(self.node, cnames)

proc_action = Node(
package='gz_ros2_control_demos',
executable='example_velocity',
Expand Down

0 comments on commit 347c8d4

Please sign in to comment.