Skip to content

Commit

Permalink
Adjust expectation for number of splits in SequentialCompressionWrite…
Browse files Browse the repository at this point in the history
…rTest

writer_creates_correct_metadata_relative_filepaths since logic for split
has been changed.

Now it will be fair. If specified max_baf_file_size = 1 it will be
reasonable to expect only one message per file.

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
  • Loading branch information
MichaelOrlov committed Dec 16, 2021
1 parent 766cd70 commit 9eb66e1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,14 @@ TEST_F(SequentialCompressionWriterTest, writer_creates_correct_metadata_relative
message->topic_name = test_topic_name;

writer_->write(message);
// bag size == max_bafile_size, no split yet
// bag size == max_bagfile_size, split
writer_->write(message);
// bag size > max_bagfile_size, split
// bag size == max_bagfile_size, split
writer_->write(message);
writer_.reset();

EXPECT_EQ(
intercepted_metadata_.relative_file_paths.size(), 2u);
intercepted_metadata_.relative_file_paths.size(), 3u);

const auto base_path = tmp_dir_storage_options_.uri;
int counter = 0;
Expand Down

0 comments on commit 9eb66e1

Please sign in to comment.