Skip to content

Commit

Permalink
fix: Fix flaky TaskPauseTest.resumeFuture test
Browse files Browse the repository at this point in the history
Summary: There is race condition that task driver finish asynchronously

Differential Revision: D66862540
  • Loading branch information
xiaoxmeng authored and facebook-github-bot committed Dec 6, 2024
1 parent 939c102 commit 46b70f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion velox/exec/tests/TaskTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,9 @@ DEBUG_ONLY_TEST_F(TaskPauseTest, resumeFuture) {
observeThread.join();

ASSERT_EQ(task_->numTotalDrivers(), 1);
ASSERT_EQ(task_->numFinishedDrivers(), 1);
while (task_->numFinishedDrivers() != 1) {
std::this_thread::sleep_for(std::chrono::milliseconds(100)); // NOLINT
}
ASSERT_EQ(task_->numRunningDrivers(), 0);
}

Expand Down

0 comments on commit 46b70f2

Please sign in to comment.