diff --git a/cpp/src/scheduler/ResourceMgr.cpp b/cpp/src/scheduler/ResourceMgr.cpp index 41c4ddbc5ea0b993d0dd4339987771978a18190b..3ea8a56ef81ff1fdaba264ee7ab48ada738fa819 100644 --- a/cpp/src/scheduler/ResourceMgr.cpp +++ b/cpp/src/scheduler/ResourceMgr.cpp @@ -105,6 +105,8 @@ void ResourceMgr::Clear() { std::lock_guard lck(resources_mutex_); disk_resources_.clear(); + cpu_resources_.clear(); + gpu_resources_.clear(); resources_.clear(); } diff --git a/cpp/unittest/db/utils.cpp b/cpp/unittest/db/utils.cpp index 61c75a09338013f7f73b7a0af44a4fb52282750b..c5874be694b46712a61bb787849dd64e2f73b2cd 100644 --- a/cpp/unittest/db/utils.cpp +++ b/cpp/unittest/db/utils.cpp @@ -123,6 +123,7 @@ DBTest::TearDown() { ms::scheduler::JobMgrInst::GetInstance()->Stop(); ms::scheduler::SchedInst::GetInstance()->Stop(); ms::scheduler::ResMgrInst::GetInstance()->Stop(); + ms::scheduler::ResMgrInst::GetInstance()->Clear(); BaseTest::TearDown();