diff --git a/services/distributeddataservice/app/test/unittest/kvstore_data_service_test.cpp b/services/distributeddataservice/app/test/unittest/kvstore_data_service_test.cpp index 9369578b1..e335ae22b 100644 --- a/services/distributeddataservice/app/test/unittest/kvstore_data_service_test.cpp +++ b/services/distributeddataservice/app/test/unittest/kvstore_data_service_test.cpp @@ -57,7 +57,8 @@ HWTEST_F(KvStoreDataServiceTest, RegisterClientDeathObserver001, TestSize.Level1 KvStoreDataService kvDataService; Bootstrap::GetInstance().LoadComponents(); Bootstrap::GetInstance().LoadCheckers(); - KvStoreMetaManager::GetInstance().InitMetaParameter(std::make_shared(12, 5)); + KvStoreMetaManager::GetInstance().BindExecutor(std::make_shared(12, 5)); + KvStoreMetaManager::GetInstance().InitMetaParameter(); Status status = kvDataService.RegisterClientDeathObserver(appId, new KvStoreClientDeathObserver()); EXPECT_EQ(status, Status::SUCCESS) << "RegisterClientDeathObserver failed"; } diff --git a/services/distributeddataservice/app/test/unittest/session_manager_test.cpp b/services/distributeddataservice/app/test/unittest/session_manager_test.cpp index e834cfe26..6320bfd6c 100644 --- a/services/distributeddataservice/app/test/unittest/session_manager_test.cpp +++ b/services/distributeddataservice/app/test/unittest/session_manager_test.cpp @@ -41,7 +41,8 @@ public: Bootstrap::GetInstance().LoadComponents(); Bootstrap::GetInstance().LoadDirectory(); Bootstrap::GetInstance().LoadCheckers(); - KvStoreMetaManager::GetInstance().InitMetaParameter(executors); + KvStoreMetaManager::GetInstance().BindExecutor(executors); + KvStoreMetaManager::GetInstance().InitMetaParameter(); KvStoreMetaManager::GetInstance().InitMetaListener(); DeviceManagerAdapter::GetInstance().Init(executors); diff --git a/services/distributeddataservice/service/rdb/rdb_service_impl.cpp b/services/distributeddataservice/service/rdb/rdb_service_impl.cpp index d526c6d2d..983f6df9a 100644 --- a/services/distributeddataservice/service/rdb/rdb_service_impl.cpp +++ b/services/distributeddataservice/service/rdb/rdb_service_impl.cpp @@ -232,8 +232,10 @@ std::shared_ptr RdbServiceImpl::GetRdbSyncer(const RdbSyncerParam &pa syncer = it->second; if (!param.isEncrypt_ || param.password_.empty()) { executors_->Remove(syncer->GetTimerId(), true); - auto timerId = executors_->Schedule(std::chrono::milliseconds(SYNCER_TIMEOUT), [this, syncer] { SyncerTimeout(syncer); }); - syncer->SetTimerId(timerId ); + auto timerId = executors_->Schedule(std::chrono::milliseconds(SYNCER_TIMEOUT), [this, syncer] { + SyncerTimeout(syncer); + }); + syncer->SetTimerId(timerId); return true; } syncers.erase(storeId);