-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flaky test in test_rosbag2_record_end_to_end #790
Comments
This problem was found at #788 (comment). |
I have analyzed problems at #788 (comment), but the solution need to be discussed here. I find CI report failure.
The failure reason includes 2 points.
This leads to the error as the below (The number of publishing message doesn't match the number of recorded message) Now we have no interface to make sure rosbag finish discovering topic, so I want to add sleep before publishing message to make sure discover is finished.
start_execution() will start rosbag command in new process. rosbag2/rosbag2_tests/test/rosbag2_tests/record_fixture.hpp Lines 120 to 131 in 6f7503e
As the above codes, current process also access sqlite3 database. This leads that the lock occurs.
|
Problem 1. While publishing the message, sometimes rosbag doesn't discover the topic to be recordedThis leads that first message is lost (Not record it) rosbag2/rosbag2_tests/test/rosbag2_tests/test_rosbag2_record_end_to_end.cpp Lines 121 to 129 in 6f7503e
But I have no idea on how to confirm rosbag find all topics which will be recorded before Problem 2. It is possible that 2 processes access the created sqlite3 database at the same time.rosbag2/rosbag2_tests/test/rosbag2_tests/record_fixture.hpp Lines 120 to 131 in 6f7503e
I think we need not open this file as sqlite3 data file to check. Instead, only check if file exists. |
@Barry-Xu-2018 For the Problem 1 related to the discovery it would be more appropriate to add I can do a PR if you are not sure how to do it, please let me know. As regards to the |
Thanks. I will add this function and update test codes.
Okay. I will confirm this. If also have problems, we can directly use sqlite3 API to check if this new DB file can be opened. |
Please help to review #797 |
Fix #797 was merged. |
Description
test cases for test_rosbag2_record_end_to_end sometimes fails
Expected Behavior
Get stabilization result
Actual Behavior
Sometimes failure
To Reproduce
Repeat run test_rosbag2_record_end_to_end in rosbags_test
colcon test --event-handlers console_direct+ --packages-select rosbag2_tests --ctest-args -R test_rosbag2_record_end_to_end --repeat-until-fail 1000
System (please complete the following information)
Additional context
This problem also occurs in CI system
The text was updated successfully, but these errors were encountered: