Skip to content

Commit 7eef396

Browse files
committed
fixed test
1 parent f07f668 commit 7eef396

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cachelib/allocator/tests/AllocatorMemoryTiersTest.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,13 @@ class AllocatorMemoryTiersTest : public AllocatorTest<AllocatorT> {
9696
ASSERT_NE(nullptr, handle);
9797
const uint8_t cid = allocator->getAllocInfo(handle->getMemory()).classId;
9898

99-
//wait for bg movers
100-
std::this_thread::sleep_for(std::chrono::seconds(1));
10199

102100
auto stats = allocator->getGlobalCacheStats();
101+
while (stats.evictionStats.runCount < 1) {
102+
std::this_thread::sleep_for(std::chrono::seconds(1));
103+
stats = allocator->getGlobalCacheStats();
104+
}
105+
103106
auto perclassEstats = allocator->getBackgroundMoverClassStats(MoverDir::Evict);
104107
auto perclassPstats = allocator->getBackgroundMoverClassStats(MoverDir::Promote);
105108

0 commit comments

Comments
 (0)