Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail to detect ungraceful ending of action client #405

Open
rotu opened this issue Mar 12, 2020 · 0 comments
Open

Tests fail to detect ungraceful ending of action client #405

rotu opened this issue Mar 12, 2020 · 0 comments
Assignees

Comments

@rotu
Copy link
Contributor

rotu commented Mar 12, 2020

Bugreport

Required Info:

  • Operating System:
    • Ubuntu Focal
  • Installation type:
    • source
  • Version or commit hash:
    • master
  • DDS implementation:
    • FastRTPS
  • Client library (if applicable):
    • rclpy

Steps to reproduce issue

colcon test --packages-select test_communication

Expected behavior

If the action server or action client is terminated ungracefully, tests should fail.

Actual behavior

Tests pass despite log output that indicates cleanup failed:
ros2/rclpy#524

17: Test command: /usr/bin/python3 "-u" "/tmp/ws/install_isolated/ament_cmake_test/share/ament_cmake_test/cmake/run_test.py" "/tmp/ws/test_results/test_communication/test_action_client_server__rclpy__rmw_fastrtps_cpp.xunit.xml" "--package-name" "test_communication" "--output-file" "/tmp/ws/build_isolated/test_communication/launch_test/CHANGEME.txt" "--append-env" "LD_LIBRARY_PATH=/tmp/ws/build_isolated/test_communication" "--command" "/usr/bin/python3" "-m" "launch_testing.launch_test" "/tmp/ws/build_isolated/test_communication/test_action_client_server__rclpy__rmw_fastrtps_cpp_.py" "--junit-xml=/tmp/ws/test_results/test_communication/test_action_client_server__rclpy__rmw_fastrtps_cpp.xunit.xml" "--package-name=test_communication"
17: Test timeout computed to be: 60
17: -- run_test.py: extra environment variables to append:
17:  - LD_LIBRARY_PATH+=/tmp/ws/build_isolated/test_communication
17: -- run_test.py: invoking following command in '/tmp/ws/build_isolated/test_communication':
17:  - /usr/bin/python3 -m launch_testing.launch_test /tmp/ws/build_isolated/test_communication/test_action_client_server__rclpy__rmw_fastrtps_cpp_.py --junit-xml=/tmp/ws/test_results/test_communication/test_action_client_server__rclpy__rmw_fastrtps_cpp.xunit.xml --package-name=test_communication
17: 
17: Starting test run test_communication.test_action_client_server__rclpy__rmw_fastrtps_cpp_.launch_tests[Fibonacci]
17: [INFO] [launch]: All log files can be found below /home/buildfarm/.ros/log/2020-03-12-04-03-39-582329-e523ecceac2a-5255
17: [INFO] [launch]: Default logging verbosity is set to INFO
17: test_client_finishes_in_a_finite_amount_of_time[Fibonacci] (test_communication.TestActionClientServer)
17: Test that the second executable terminates after a finite amount of time. ... [INFO] [test_action_server-1]: process started with pid [5258]
17: [INFO] [test_action_client-2]: process started with pid [5260]
17: [test_action_client-2] Sending goal for test number 0
17: [test_action_client-2] Exception ignored in: <function ActionClient.__del__ at 0x7f2115f12700>
17: [test_action_client-2] Traceback (most recent call last):
17: [test_action_client-2]   File "/tmp/ws/install_isolated/rclpy/lib/python3.8/site-packages/rclpy/action/client.py", line 596, in __del__
17: [test_action_client-2]   File "/tmp/ws/install_isolated/rclpy/lib/python3.8/site-packages/rclpy/action/client.py", line 589, in destroy
17: [test_action_client-2]   File "/tmp/ws/install_isolated/rclpy/lib/python3.8/site-packages/rclpy/handle.py", line 124, in __enter__
17: [test_action_client-2]   File "/tmp/ws/install_isolated/rclpy/lib/python3.8/site-packages/rclpy/handle.py", line 106, in _get_capsule
17: [test_action_client-2] rclpy.handle.InvalidHandle: Tried to use a handle that has been destroyed.
17: [INFO] [test_action_client-2]: process has finished cleanly [pid 5260]
17: ok
17: 
17: ----------------------------------------------------------------------
17: Ran 1 test in 1.187s
17: 
17: OK
17: [INFO] [test_action_server-1]: sending signal 'SIGINT' to process[test_action_server-1]
17: [test_action_server-1] Exception ignored in: <function ActionServer.__del__ at 0x7fce84bc3040>
17: [test_action_server-1] Traceback (most recent call last):
17: [test_action_server-1]   File "/tmp/ws/install_isolated/rclpy/lib/python3.8/site-packages/rclpy/action/server.py", line 625, in __del__
17: [test_action_server-1]   File "/tmp/ws/install_isolated/rclpy/lib/python3.8/site-packages/rclpy/action/server.py", line 618, in destroy
17: [test_action_server-1]   File "/tmp/ws/install_isolated/rclpy/lib/python3.8/site-packages/rclpy/handle.py", line 124, in __enter__
17: [test_action_server-1]   File "/tmp/ws/install_isolated/rclpy/lib/python3.8/site-packages/rclpy/handle.py", line 106, in _get_capsule
17: [test_action_server-1] rclpy.handle.InvalidHandle: Tried to use a handle that has been destroyed.
17: [INFO] [test_action_server-1]: process has finished cleanly [pid 5258]
17: test_processes_finished_gracefully[Fibonacci] (test_communication.TestActionClientServerAfterShutdown)
17: Test that both executables finished gracefully. ... ok
17: 
17: ----------------------------------------------------------------------
17: Ran 1 test in 0.000s
17: 
17: OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants