File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 3030
3131import os
3232import unittest
33+ import psutil
3334import subprocess
3435
3536from 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 ()
You can’t perform that action at this time.
0 commit comments