Skip to content

Commit c9dac9d

Browse files
tanjialiangfacebook-github-bot
authored andcommitted
Fix flaky spill test (facebookincubator#10629)
Summary: Fast machines might be able to make each write in sub-microsecond, recorded as 0us in each stats addition. This may result in the total write time to be 0us. Loose the condition to make the test non-flaky. Pull Request resolved: facebookincubator#10629 Reviewed By: kevinwilfong Differential Revision: D60551759 Pulled By: tanjialiang fbshipit-source-id: 0c1fdc93759844ad42969827aa96e38cbc2ed48d
1 parent 9708e57 commit c9dac9d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

velox/exec/tests/SpillTest.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,9 @@ class SpillTest : public ::testing::TestWithParam<common::CompressionKind>,
291291
ASSERT_EQ(stats.spilledFiles, expectedNumSpilledFiles);
292292
ASSERT_GT(stats.spilledBytes, 0);
293293
ASSERT_GT(stats.spillWrites, 0);
294-
ASSERT_GT(stats.spillWriteTimeUs, 0);
294+
// NOTE: On fast machines we might have sub-microsecond in each write,
295+
// resulting in 0us total write time.
296+
ASSERT_GE(stats.spillWriteTimeUs, 0);
295297
ASSERT_GE(stats.spillFlushTimeUs, 0);
296298
ASSERT_GT(stats.spilledRows, 0);
297299
// NOTE: the following stats are not collected by spill state.

0 commit comments

Comments
 (0)