Skip to content

Commit

Permalink
fix(rosbag2_cpp): Remove unnecessary ManualSplitSequentialWriter.
Browse files Browse the repository at this point in the history
After making split_bagfile public, this class was no longer necessary.

Signed-off-by: Rick Shanor <rickshanor@gmail.com>
  • Loading branch information
rshanor committed Oct 10, 2022
1 parent 0305626 commit d4e52cc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion rosbag2_cpp/test/rosbag2_cpp/fake_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void write_sample_split_bag(
{
std::string topic_name = "testtopic";

ManualSplitSequentialWriter writer{};
rosbag2_cpp::writers::SequentialWriter writer{};
writer.open(storage_options, rosbag2_cpp::ConverterOptions{});
writer.create_topic(
{
Expand Down
6 changes: 0 additions & 6 deletions rosbag2_cpp/test/rosbag2_cpp/fake_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@

#include "rosbag2_cpp/writers/sequential_writer.hpp"

class ManualSplitSequentialWriter : public rosbag2_cpp::writers::SequentialWriter
{
public:
using rosbag2_cpp::writers::SequentialWriter::split_bagfile;
};

// Write vector of <timestamp, uint32_data_value> pairs to bag files, splitting every N messages
void write_sample_split_bag(
const rosbag2_storage::StorageOptions & storage_options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,6 @@ TEST_F(RecordSrvsSplitBagfileTest, split_bagfile)
MockSequentialWriter & mock_writer =
static_cast<MockSequentialWriter &>(writer.get_implementation_handle());
EXPECT_FALSE(mock_writer.split_bagfile_called());

std::chrono::duration<float> duration(2.0);
std::this_thread::sleep_for(duration);
EXPECT_FALSE(mock_writer.split_bagfile_called());

successful_service_request<SplitBagfile>(cli_split_bagfile_);
EXPECT_TRUE(mock_writer.split_bagfile_called());
}

0 comments on commit d4e52cc

Please sign in to comment.