Skip to content

Commit

Permalink
fix: Fix flaky TaskPauseTest.resumeFuture test (#11773)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #11773

There is race condition that task driver finish asynchronously

Reviewed By: tanjialiang

Differential Revision: D66862540

fbshipit-source-id: 8809a7ab5b4a8049a15779788fc70f167dbfaf9b
  • Loading branch information
xiaoxmeng authored and facebook-github-bot committed Dec 6, 2024
1 parent 939c102 commit 3ead2f4
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 3ead2f4

Please sign in to comment.