Correct expectation for exit code in play_end_to_end test since after… #763
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have failing
PlayEndToEndTestFixture, play_fails_gracefully_if_needed_coverter_plugin_does_not_exist
test on CI.I have tried to make a brief analysis and come to conclusion that it should be expectation for
EXIT_FAILURE
atEXPECT_THAT(exit_code, Eq(EXIT_SUCCESS));
https://github.com/ros2/rosbag2/blob/master/rosbag2_tests/test/rosbag2_tests/test_rosbag2_play_end_to_end.cpp#L118.
EXIT_FAILURE
result in this case.It seems first time we are creating format converter in void SequentialReader::check_converter_serialization_format
which we are calling from void SequentialReader::open(..)
First time we are calling reader_->open(storage_options_, {"", rmw_get_serialization_format()}); in constructor of the player class which we invoke in rosbag2_py::Player::play() which is finally invokes from
ros2bag verb play.py
interfaceNone of them have try catch clause on the back trace.
The reason why we started to getting this test fail is because we made some redesign inside
Player
class and now we are calling in constructorreader_->open(storage_options_, {"", rmw_get_serialization_format()});
Before redesign we were calling this reader_->open(..) in
Player::play(..)
method only where it was wrapped with try-catch statement.I think it will be incorrect to wrap call
with try-catch statement in constructor. Therefore I am changing expectation in unit test.