self = <test.test_executor.TestExecutor testMethod=test_executor_spin_until_future_complete_timeout>
def test_executor_spin_until_future_complete_timeout(self) -> None:
self.assertIsNotNone(self.node.handle)
for cls in [SingleThreadedExecutor, EventsExecutor]:
with self.subTest(cls=cls):
executor = cls(context=self.context)
executor.add_node(self.node)
def timer_callback() -> None:
pass
timer = self.node.create_timer(0.003, timer_callback)
# Timeout
future = Future[None]()
self.assertFalse(future.done())
start = time.perf_counter()
executor.spin_until_future_complete(future=future, timeout_sec=0.1)
end = time.perf_counter()
# Nothing is ever setting the future, so this should have waited
# at least 0.1 seconds.
> self.assertGreaterEqual(end - start, 0.1)
E AssertionError: 0.0979279987514019 not greater than or equal to 0.1
..\..\src\ros2\rclpy\rclpy\test\test_executor.py:500: AssertionError
- generated xml file: C:\ci\ws\build\rclpy\test_results\rclpy\test_executor.xunit.xml
Generated by Generative AI
No response
Operating System:
Windows 10
ROS version or commit hash:
Rolling
RMW implementation (if applicable):
No response
RMW Configuration (if applicable):
No response
Client library (if applicable):
rclpy
'ros2 doctor --report' output
ros2 doctor --report
<COPY OUTPUT HERE>Steps to reproduce issue
Expected behavior
Tests should pass
Actual behavior
Tests are failing
Additional information
Reference builds:
Test regressions:
projectroot.test_executor
rclpy.rclpy.test.test_executor.TestExecutor.test_executor_spin_until_future_complete_timeout
Log output:
This test started failing in 03/22/2025, after #1391. See changes
Flakiness: