Skip to content

Commit

Permalink
fixing review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Marwan Taher <marokhaled99@gmail.com>
  • Loading branch information
Marwan99 committed Jul 21, 2020
1 parent ae6fd06 commit 3529fc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SequentialWriterTest : public Test
storage_options_.uri = "uri";

rcpputils::fs::path dir(storage_options_.uri);
rcpputils::fs::remove(dir);
rcpputils::fs::remove_all(dir);

ON_CALL(*storage_factory_, open_read_write(_, _)).WillByDefault(
DoAll(
Expand All @@ -65,7 +65,7 @@ class SequentialWriterTest : public Test
~SequentialWriterTest()
{
rcpputils::fs::path dir(storage_options_.uri);
rcpputils::fs::remove(dir);
rcpputils::fs::remove_all(dir);
}

std::unique_ptr<StrictMock<MockStorageFactory>> storage_factory_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ TEST_F(RecordFixture, record_fails_gracefully_if_bag_already_exists) {
TEST_F(RecordFixture, record_fails_if_both_all_and_topic_list_is_specified) {
internal::CaptureStderr();
auto exit_code =
WEXITSTATUS(std::system("ros2 bag record -a /some_topic"));
execute_and_wait_until_completion("ros2 bag record -a /some_topic", temporary_dir_path_);
auto error_output = internal::GetCapturedStderr();

EXPECT_THAT(exit_code, Eq(EXIT_FAILURE));
Expand All @@ -569,7 +569,7 @@ TEST_F(RecordFixture, record_fails_if_both_all_and_topic_list_is_specified) {
TEST_F(RecordFixture, record_fails_gracefully_if_plugin_for_given_encoding_does_not_exist) {
internal::CaptureStderr();
auto exit_code =
WEXITSTATUS(std::system("ros2 bag record -a -f some_rmw"));
execute_and_wait_until_completion("ros2 bag record -a -f some_rmw", temporary_dir_path_);
auto error_output = internal::GetCapturedStderr();

EXPECT_THAT(exit_code, Eq(EXIT_SUCCESS));
Expand Down

0 comments on commit 3529fc2

Please sign in to comment.