Skip to content

Commit

Permalink
fix: flaky abort exchange test
Browse files Browse the repository at this point in the history
Summary: Similar to other tests in MultiFragmentTest, we need to wait for the terminate functions to execute

Differential Revision: D67636573
  • Loading branch information
yuandagits authored and facebook-github-bot committed Dec 25, 2024
1 parent 48e3a4d commit 54bb484
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions velox/exec/tests/MultiFragmentTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,10 @@ TEST_P(MultiFragmentTest, abortMergeExchange) {
// Ensure that the threads in the executor can gracefully join
executor.join();

/* sleep override */
// Wait till all the terminations, closures and destructions are done.
std::this_thread::sleep_for(std::chrono::seconds(1));

// The references to mergeTask should be two, one for the local variable
// itself and one reference inside tasks variable.
EXPECT_EQ(mergeTask.use_count(), 2);
Expand Down

0 comments on commit 54bb484

Please sign in to comment.