Skip to content

Commit

Permalink
fix: Fix text writer abort test (facebookincubator#12004)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: facebookincubator#12004

Reviewed By: xiaoxmeng

Differential Revision: D67767527

Pulled By: kewang1024

fbshipit-source-id: 77742a077075214c0f4b1a7e38386bcb6eac4e3b
  • Loading branch information
kewang1024 authored and facebook-github-bot committed Jan 3, 2025
1 parent c324cd8 commit 23889df
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 23889df

Please sign in to comment.