Skip to content

Commit 41a1982

Browse files
Increase sigterm timeout (#718)
1 parent f09c240 commit 41a1982

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

example_13/test/test_three_robots_launch.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
import os
3232
import unittest
33+
import psutil
3334
import subprocess
3435

3536
from ament_index_python.packages import get_package_share_directory
@@ -56,7 +57,7 @@ def generate_test_description():
5657
"launch/three_robots.launch.py",
5758
)
5859
),
59-
launch_arguments={"gui": "false"}.items(),
60+
launch_arguments={"gui": "false", "sigterm_timeout": "10"}.items(),
6061
)
6162

6263
return LaunchDescription([launch_include, ReadyToTest()])
@@ -349,3 +350,10 @@ class TestDescriptionCraneShutdown(unittest.TestCase):
349350
def test_exit_codes(self, proc_info):
350351
"""Check if the processes exited normally."""
351352
launch_testing.asserts.assertExitCodes(proc_info)
353+
354+
def test_process_running(self):
355+
for proc in psutil.process_iter():
356+
# check whether the process name matches
357+
if "ros2_control_node" in proc.name():
358+
print("ros2_control_node found")
359+
proc.kill()

0 commit comments

Comments
 (0)