ApexAI / apex_rostest

Framework for ROS2 Integration Testing
5 stars 6 forks source link

Nightly build started to fail #42

Closed pbaughman closed 5 years ago

pbaughman commented 5 years ago

I have a scheduled CI job that runs against the 'nightly' docker image. In this image, I can no longer run the talker_listener.test.py example.

Steps to reproduce (assuming apex_rostest repo is cloned to ~/apex_rostest:

> docker pull osrf/ros2:nightly

> docker run --rm -it -v ~/apex_rostest:/apex_rostest osrf/ros2:nightly

root@79aa092a2364:/# cd /apex_rostest/

root@79aa092a2364:/apex_rostest# colcon build
Starting >>> apex_launchtest
Finished <<< apex_launchtest [0.64s]          
Starting >>> apex_launchtest_cmake
Starting >>> apex_launchtest_ros
Finished <<< apex_launchtest_cmake [0.57s]                                                           
Finished <<< apex_launchtest_ros [0.59s]

Summary: 3 packages finished [1.35s]

root@79aa092a2364:/apex_rostest# source install/setup.bash 
[connext_cmake_module] Warning: The location at which Connext was found when the workspace was built [[/opt/rti.com/rti_connext_dds-5.3.1]] does not point to a valid directory, and the NDDSHOME environment variable has not been set. Support for Connext will not be available.

root@79aa092a2364:/apex_rostest# apex_launchtest apex_launchtest_ros/examples/talker_listener.test.py

You should see the example test test_talker_transmits fail with the following stack trace:

======================================================================
FAIL: test_talker_transmits (talker_listener.test.py.TestTalkerListenerLink)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/apex_rostest/apex_launchtest_ros/examples/talker_listener.test.py", line 126, in test_talker_transmits
    self.spin_rclpy(1.0)
  File "/apex_rostest/apex_launchtest_ros/examples/talker_listener.test.py", line 109, in spin_rclpy
    executor.spin_once(timeout_sec=timeout_sec)
  File "/opt/ros/crystal/lib/python3.6/site-packages/rclpy/executors.py", line 631, in spin_once
    handler, entity, node = self.wait_for_ready_callbacks(timeout_sec=timeout_sec)
  File "/opt/ros/crystal/lib/python3.6/site-packages/rclpy/executors.py", line 617, in wait_for_ready_callbacks
    return next(self._cb_iter)
  File "/opt/ros/crystal/lib/python3.6/site-packages/rclpy/executors.py", line 558, in _wait_for_ready_callbacks
    if sub.callback_group.can_execute(sub):
  File "/opt/ros/crystal/lib/python3.6/site-packages/rclpy/callback_groups.py", line 103, in can_execute
    assert weakref.ref(entity) in self.entities
AssertionError

----------------------------------------------------------------------
Ran 3 tests in 5.284s

This test is calling rclpy.spin until two messages are received on the 'talker_chatter' topic (remapped from just 'chatter' in the LaunchDescription

This just started failing in this CI pipeline using this docker image:

Using docker image sha256:14cb0769c64b280b5c609a9bef7f52393d4f306197bb48201399865486f4c6f1 for osrf/ros2:nightly ...

The previous nightly build passed without a problem using this docker image:

Using docker image sha256:4b4e5eeda437d7c64ca908c825e6464bb607a61e44cef80b5b0a1b9ec3a8136d for osrf/ros2:nightly ...
pbaughman commented 5 years ago

@wjwwood Any idea who I can ask about this? It looks like there were a few recent rclpy changes that coincide with this problem. I'll cross-reference the issue on the rclpy repo.

@hidmic This will likely affect the launch_testing fork version too.

pbaughman commented 5 years ago

It looks like this is an issue in rclpy, so this will magically start to work again once that's fixed

pbaughman commented 5 years ago

New nightly docker image is out. CI is passing again with Pipeline https://gitlab.com/ApexAI/apex_rostest/pipelines/58879728