ros2 / domain_bridge

Bridge communication across different ROS 2 domains.
Apache License 2.0
52 stars 12 forks source link

Flaky end-to-end tests #46

Closed rebecca-butler closed 3 years ago

rebecca-butler commented 3 years ago

Some of the tests in test_domain_bridge_end_to_end.cpp fail occasionally when running colcon test:

- domain_bridge.TestDomainBridgeEndToEnd compress_mode
  <<< failure message
    /home/rebecca/ws/domain_bridge_ws/domain_bridge/test/domain_bridge/test_domain_bridge_end_to_end.cpp:216
    Value of: poll_condition([&got_message]() {return got_message.load();}, 3s)
      Actual: false
    Expected: true
  >>>

I've seen messages like this for the compress_mode, decompress_mode, and remap_topic_name tests.

jacobperron commented 3 years ago

@ivanpauno Any ideas about what's happening here?

jacobperron commented 3 years ago

If sub->get_publisher_count() == 1u does it guarantee that the subscription will receive the one published message?

ivanpauno commented 3 years ago

mmm, maybe we also have to wait until pub->get_subscription_count() is the correct number of subscriptions (?). If both conditions are satisfied I would expect the message to always arrive