diff --git a/velox/common/memory/SharedArbitrator.cpp b/velox/common/memory/SharedArbitrator.cpp index 2dc13af45901..6ca1601826f0 100644 --- a/velox/common/memory/SharedArbitrator.cpp +++ b/velox/common/memory/SharedArbitrator.cpp @@ -1384,7 +1384,6 @@ SharedArbitrator::GlobalArbitrationSection::GlobalArbitrationSection( SharedArbitrator::GlobalArbitrationSection::~GlobalArbitrationSection() { VELOX_CHECK(arbitrator_->globalArbitrationRunning_); arbitrator_->globalArbitrationRunning_ = false; - ; } std::string SharedArbitrator::kind() const { diff --git a/velox/common/memory/tests/MockSharedArbitratorTest.cpp b/velox/common/memory/tests/MockSharedArbitratorTest.cpp index b506c5c39876..1a36784bc887 100644 --- a/velox/common/memory/tests/MockSharedArbitratorTest.cpp +++ b/velox/common/memory/tests/MockSharedArbitratorTest.cpp @@ -2287,6 +2287,7 @@ TEST_F(MockSharedArbitrationTest, ensureMemoryPoolMaxCapacity) { memCapacity - memCapacity / 2, false, false}}; + for (const auto& testData : testSettings) { SCOPED_TRACE(testData.debugString()); setupMemory( @@ -2322,6 +2323,8 @@ TEST_F(MockSharedArbitrationTest, ensureMemoryPoolMaxCapacity) { } else if (testData.hasOtherTask) { ASSERT_EQ(otherOp->reclaimer()->stats().numReclaims, 0); } + test::SharedArbitratorTestHelper arbitratorHelper(arbitrator_); + arbitratorHelper.waitForGlobalArbitrationToFinish(); if (testData.expectedSuccess && (((testData.allocatedBytes + testData.requestBytes) > testData.poolMaxCapacity) ||