Skip to content

Commit 5c9e843

Browse files
Bikramjeet Vigfacebook-github-bot
Bikramjeet Vig
authored andcommitted
Fix flakiness in 2 tests in TableWriterArbitrationTest
Summary: This fixes flakiness in these tests that may be encountered if the test finishes before the Tasks get a chance to be destroyed. If this happens then when the memory manager gets deleted, it can lead to errors because some memory pools (which are maintained by the potentially active Tasks) would still exist holding onto memory whereas it expects all to be destoryed. The fix here is to simply wait for the Tasks to be deleted. Reviewed By: xiaoxmeng Differential Revision: D54226837
1 parent 4ce58d3 commit 5c9e843

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

velox/exec/tests/TableWriteTest.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -3724,6 +3724,7 @@ DEBUG_ONLY_TEST_F(
37243724
ASSERT_EQ(arbitrator->stats().numFailures, 1);
37253725
ASSERT_EQ(arbitrator->stats().numNonReclaimableAttempts, 1);
37263726
ASSERT_EQ(arbitrator->stats().numReserves, 1);
3727+
waitForAllTasksToBeDeleted();
37273728
}
37283729

37293730
DEBUG_ONLY_TEST_F(
@@ -3815,6 +3816,7 @@ DEBUG_ONLY_TEST_F(
38153816
ASSERT_EQ(arbitrator->stats().numFailures, 0);
38163817
ASSERT_GT(arbitrator->stats().numReclaimedBytes, 0);
38173818
ASSERT_EQ(arbitrator->stats().numReserves, 1);
3819+
waitForAllTasksToBeDeleted();
38183820
}
38193821

38203822
DEBUG_ONLY_TEST_F(

0 commit comments

Comments
 (0)