From 8003b709d266f2c56268471b8430f98ea0d727a3 Mon Sep 17 00:00:00 2001 From: starlord Date: Thu, 12 Sep 2019 17:06:41 +0800 Subject: [PATCH] fix scheduler unittest error Former-commit-id: 65a76790634a63b3777aa79f038ea61f6fdf546f --- cpp/unittest/scheduler/scheduler_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/unittest/scheduler/scheduler_test.cpp b/cpp/unittest/scheduler/scheduler_test.cpp index 702e1a83..5a1824a1 100644 --- a/cpp/unittest/scheduler/scheduler_test.cpp +++ b/cpp/unittest/scheduler/scheduler_test.cpp @@ -94,6 +94,10 @@ class SchedulerTest : public testing::Test { protected: void SetUp() override { + constexpr int64_t cache_cap = 1024*1024*1024; + cache::GpuCacheMgr::GetInstance(0)->SetCapacity(cache_cap); + cache::GpuCacheMgr::GetInstance(1)->SetCapacity(cache_cap); + ResourcePtr cpu = ResourceFactory::Create("cpu", "CPU", 0, true, false); ResourcePtr gpu_0 = ResourceFactory::Create("gpu0", "GPU", 0); ResourcePtr gpu_1 = ResourceFactory::Create("gpu1", "GPU", 1); -- GitLab