ros / geometry2

A set of ROS packages for keeping track of coordinate transforms.
190 stars 275 forks source link

Mitigate flakey test in tf2_ros #490

Closed at-wat closed 3 years ago

at-wat commented 3 years ago

transform_listener_backwards_reset fails almost 100% on my AMD EPYC environment. Sleep by spin_for_a_second() seems to be too small and slept only a millisecond. Fix it to a second to match with the function name. This makes the test possible to pass on EPYC environment.

at-wat commented 3 years ago

There seems be an another flaky condition (which is not fixed by this PR) at the same point of the test: http://build.ros.org/job/Npr__geometry2__ubuntu_focal_amd64/55/, http://build.ros.org/job/Npr__geometry2__ubuntu_focal_amd64/39/ and http://build.ros.org/job/Npr__geometry2__ubuntu_focal_amd64/62/. In this case, time jump back is not detected at: https://github.com/ros/geometry2/blob/dae26a225e6c14a5aabd25a8b08c3031e6563535/tf2_ros/src/transform_listener.cpp#L106-L111 even when the test publishes old time to /clock at: https://github.com/ros/geometry2/blob/dae26a225e6c14a5aabd25a8b08c3031e6563535/tf2_ros/test/time_reset_test.cpp#L84-L85

tfoote commented 3 years ago

In this case, time jump back is not detected at:

Yes we're tracking time_backwards in #129 and don't have a root cause of the flakiness. Longer timeouts decrease the frequency but don't guarantee passing.