ros2 / rclpy

rclpy (ROS Client Library for Python)
Apache License 2.0
268 stars 221 forks source link

:farmer: `test_guard_condition` failing consisntent in CycloneDDS #1266

Open Crola1702 opened 3 months ago

Crola1702 commented 3 months ago

Bug report

Required Info:

Steps to reproduce issue

  1. Run a build in Rolling cyclonedds or Jazzy cyclonedds
  2. See test regressions appear

Additional information

Reference build:

Test regressions:

Log output:

projectroot.test_guard_condition (and TestGuardCondition.test_double_trigger and TestGuardCondition.test_trigger) ``` ============================= test session starts ============================== platform linux -- Python 3.10.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.0 cachedir: /tmp/ws/build_isolated/rclpy/ament_cmake_pytest/test_guard_condition/.cache rootdir: /tmp/ws/src/ros2/rclpy, configfile: pytest.ini plugins: ament-xmllint-0.16.4, ament-copyright-0.16.4, ament-pep257-0.16.4, ament-flake8-0.16.4, ament-lint-0.16.4, mock-3.6.1, timeout-2.1.0, cov-3.0.0, colcon-core-0.16.0, rerunfailures-10.2 collected 2 items ../../src/ros2/rclpy/rclpy/test/test_guard_condition.py FF [100%] =================================== FAILURES =================================== ____________________ TestGuardCondition.test_double_trigger ____________________ self = def test_double_trigger(self): called1 = False called2 = False def func1(): nonlocal called1 called1 = True def func2(): nonlocal called2 called2 = True gc1 = self.node.create_guard_condition(func1) gc2 = self.node.create_guard_condition(func2) self.executor.spin_once(timeout_sec=0) self.assertFalse(called1) self.assertFalse(called2) gc1.trigger() gc2.trigger() self.executor.spin_once(timeout_sec=0) self.executor.spin_once(timeout_sec=0) self.assertTrue(called1) > self.assertTrue(called2) E AssertionError: False is not true ../../src/ros2/rclpy/rclpy/test/test_guard_condition.py:80: AssertionError _______________________ TestGuardCondition.test_trigger ________________________ self = def test_trigger(self): called = False def func(): nonlocal called called = True gc = self.node.create_guard_condition(func) self.executor.spin_once(timeout_sec=0) self.assertFalse(called) gc.trigger() self.executor.spin_once(timeout_sec=0) > self.assertTrue(called) E AssertionError: False is not true ../../src/ros2/rclpy/rclpy/test/test_guard_condition.py:52: AssertionError - generated xml file: /tmp/ws/test_results/rclpy/test_guard_condition.xunit.xml - =========================== short test summary info ============================ FAILED ../../src/ros2/rclpy/rclpy/test/test_guard_condition.py::TestGuardCondition::test_double_trigger FAILED ../../src/ros2/rclpy/rclpy/test/test_guard_condition.py::TestGuardCondition::test_trigger ============================== 2 failed in 0.26s =============================== -- run_test.py: return code 1 -- run_test.py: verify result file '/tmp/ws/test_results/rclpy/test_guard_condition.xunit.xml' ```

This is a consistent issue for Rolling and Jazzy CycloneDDS

Crola1702 commented 1 week ago

This is still a consistent issue in nightly-cyclonedds jobs (Rci, Jci)