-
Notifications
You must be signed in to change notification settings - Fork 261
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
Avoid passing exception KeyboardInterrupt to the upper layer #788
Avoid passing exception KeyboardInterrupt to the upper layer #788
Conversation
Signed-off-by: Barry Xu <[email protected]>
b3ef5b8
to
aceac06
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks. It might be nice to have a regression test for this, if you could add that
Gist: https://gist.githubusercontent.com/emersonknapp/31a0f4acbf7a9178dfbedb80dccd2d01/raw/7573fb48ec7c6d3994fa585d98eb137bf3928e3b/ros2.repos |
Signed-off-by: Barry Xu <[email protected]>
Thanks for the review.
I find there is a check. rosbag2/rosbag2_test_common/include/rosbag2_test_common/process_execution_helpers_unix.hpp Lines 67 to 69 in 6f7503e
But it checks if return is EXIT_FAILURE(1). So the check always pass. This is incorrect behavior. |
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.
If run enough times, the same problems also occur in my local environment. |
…e file Signed-off-by: Barry Xu <[email protected]>
I made a fix and want to discuss with you on how to fix. |
Thanks for analyzing the flaky test! I don't like there being an arbitrary sleep for the OK case. I think we can have timeouts, but much of the flaky behavior comes from these sleep statements - I don't know if the fix you have proposed is appropriate. However, your fix for the exit code is good, so I would prefer to break out the flaky-test fix into a separate PR, and move this fix forward independently since it is definitely OK. |
Yeah. I also don't want to use sleep.
Okay. |
… database file" This reverts commit faa1743. Signed-off-by: Barry Xu <[email protected]>
b8c7262
to
b037bbc
Compare
* Avoid passing exception KeyboardInterrupt to the upper layer Signed-off-by: Barry Xu <[email protected]>
…942) * Avoid passing exception KeyboardInterrupt to the upper layer Signed-off-by: Barry Xu <[email protected]> Signed-off-by: Barry Xu <[email protected]> Co-authored-by: Barry Xu <[email protected]>
Address #787