felixdivo / ros2-easy-test

A Python test framework for ROS2 allowing simple and expressive assertions based on message interactions.
https://ros2-easy-test.readthedocs.io
MIT License
15 stars 5 forks source link

Fix infrequent test suite failures #15

Closed felixdivo closed 1 year ago

felixdivo commented 1 year ago

The bug happens as often on rolling as on humble, and it is always only tests/test_interactions.py::TestLaunchFile::test_publisher that fails from time to time. In that trace, the test suite invocation in .github/workflows/python-package.yaml has been changed from python -m pytest to, following, since the problem only occurs sometimes:

function __run_times { seq 1 $1| { shift; xargs -i -- "$@"; } }
__run_times 10 python -m pytest
felixdivo commented 1 year ago

grafik

felixdivo commented 1 year ago

See #13 for debugging attempts. Also, restricting the numbers of CPUs does not trigger it.

felixdivo commented 1 year ago

Apparently, this is not the only job that can fail (log). tests/test_interactions.py::TestLaunchFile::test_debugging_yaml can fault as well.

felixdivo commented 1 year ago

The thread being removed in #19 might have solved this.