Skip to content

Commit 9e97b92

Browse files
committed
fix: Fix text writer abort test
1 parent 98932e5 commit 9e97b92

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

velox/dwio/text/tests/writer/TextWriterTest.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ TEST_F(TextWriterTest, abort) {
167167
writer->abort();
168168

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

0 commit comments

Comments
 (0)