Comments (3)
I fully agree assertion messages can (and should) be made clearer, simply not obscuring subscriber output, where the actual test is. But I don't think:
If failures exist, each test case terminates in a short (<1s) time and reports a relevant failure message (something like "10 messages were sent but 0 were received").
is desirable, let alone achievable (in the short to mid-term). Particularly making tests faster.
Cross-vendor pub sub tests consist of a publisher process sending a fixed sequence of known messages in cycles and a subscriber process asserting on those messages. In that context, launch testing infrastructure plays the same role than ROS 1 rostest
, and nothing more. Namely, a process launcher with timeouts and return codes checks, plus test output aggregation (where IMHO launch_testing
is particularly bad at).
To assert on the number of sent messages vs. received messages implies there's a synchronization mechanism between launcher, publisher and subscriber processes in place, or otherwise latencies in process creation, process scheduling, DDS participant creation, DDS participant discovery, to name a few, will render the test flakey and unpredictable. A synchronization mechanism that does not currently exist in the framework. We can later discuss whether that should be introduced or not, but it's certainly unlikely to land in the short term.
We could achieve something like what you describe by simplifying the test down to whether a message was received or not, but that would then be a different test.
from system_tests.
-
There is a synchronization mechanism implied; all messages must be received within a 10s window from launch for the test to be considered passing. That window seems unreasonably long and could be made much shorter. Considering all test cases I can see pass in < 2 seconds, it seems that window can be reduced.
-
Yes, it's totally reasonable to have some communication from the listener back to the test. Right now, that communication is an exit status. It could be a file, shared memory, a stream, or any sort of IPC channel.
from system_tests.
There is a synchronization mechanism implied; all messages must be received within a 10s window from launch for the test to be considered passing.
Processes start of execution is synchronized, but that's far from enough. That window is a worst case scenario, though AFAIK it's true that no exhaustive search has been conducted to find a lower bound for it.
That window seems unreasonably long and could be made much shorter. Considering all test cases I can see pass in < 2 seconds, it seems that window can be reduced.
Which tests? With which RMW implementation? On which platform? Under what CPU load?
Yes, it's totally reasonable to have some communication from the listener back to the test.
The listener is the test. So I'd refrain from rolling out an IPC just to get the launcher on this test to do the assertion.
Thinking about this again, we could explore having more timeouts in the listener e.g. timeout to first message arrival, timeout to final message arrival, instead of a single, global one, though I'd not dare to guess how small these can be made to get the test passing for all (RMW, OS) combinations. You're more than welcome to contribute an attempt.
from system_tests.
Related Issues (20)
- [test_rclcpp] An intraprocess multi-thread executor test hangs because of ring buffer HOT 1
- test_cli_remapping name_maker test failing HOT 5
- [test_security] Secure communication tests are unstable causing CI to fail sometimes HOT 4
- 👩🌾 test_publisher_subscriber_serialized__rmw_connext_cpp regression HOT 1
- Windows failure of test_action_client_server with rclcpp client and rclpy server with rmw_cyclonedds_cpp HOT 3
- test_client_scope_cpp can fail with exception HOT 1
- How to run test with my package HOT 1
- test_rclcpp.TestTwoExecutablesAfterShutdown.test_node_name flaky HOT 1
- [test_quality_of_service] test_lifespan__rmw_connext_cpp is flaky HOT 1
- test_cli_remapping is flaky
- Re-enable cross-vendor tests on Windows HOT 1
- [test_quality_of_service] Fails to build due to error [-Werror=maybe-uninitialized] HOT 1
- 👩🌾 test_communication compilation failing nightly coverage builds HOT 2
- Flaky test test_n_nodes__rmw_fastrtps_cpp HOT 1
- :man_farmer: multi_access_publisher_intra_process test failing HOT 5
- :man_farmer: `test_communication` -> `test_subscriber_terminates_in_a_finite_amount_of_time` and `test_processes_finished_gracefully` failing on Windows HOT 3
- :man_farmer: `test_security` -> `test_processes_finished_gracefully` and `test_subscriber_terminates_in_a_finite_amount_of_time` tests failing on nightlies `linux` + `linux-rhel` and windows repeated HOT 2
- `test_quality_of_service` test fails with `rmw_connextdds` HOT 3
- :farmer: `test_cli_remapping` flaky test
- [Test QoS] macOS needs target_link_libraries GTEST_LIBRARIES
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from system_tests.