Skip to content

Commit

Permalink
Fix flaky spill test (facebookincubator#10629)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tanjialiang authored and facebook-github-bot committed Aug 1, 2024
1 parent 9708e57 commit c9dac9d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion velox/exec/tests/SpillTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ class SpillTest : public ::testing::TestWithParam<common::CompressionKind>,
ASSERT_EQ(stats.spilledFiles, expectedNumSpilledFiles);
ASSERT_GT(stats.spilledBytes, 0);
ASSERT_GT(stats.spillWrites, 0);
ASSERT_GT(stats.spillWriteTimeUs, 0);
// NOTE: On fast machines we might have sub-microsecond in each write,
// resulting in 0us total write time.
ASSERT_GE(stats.spillWriteTimeUs, 0);
ASSERT_GE(stats.spillFlushTimeUs, 0);
ASSERT_GT(stats.spilledRows, 0);
// NOTE: the following stats are not collected by spill state.
Expand Down

0 comments on commit c9dac9d

Please sign in to comment.