Skip to content

Commit

Permalink
fix: Fix text writer abort test
Browse files Browse the repository at this point in the history
  • Loading branch information
kewang1024 committed Jan 2, 2025
1 parent 98932e5 commit 9e97b92
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion velox/dwio/text/tests/writer/TextWriterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ TEST_F(TextWriterTest, abort) {
writer->abort();

std::string result = readFile(filePath);
EXPECT_EQ(result.size(), 8);
// With defaultFlushCount as 10, it will trigger two times of flushes before
// abort, and abort will discard the remaining 5 characters in buffer. The
// written file would have:
// 1^Atrue
// 2^Atrue
// 3^A
EXPECT_EQ(result.size(), 14);
}
} // namespace facebook::velox::text

0 comments on commit 9e97b92

Please sign in to comment.