diff --git a/services/base/test/unittest/dms_network_adapter_test.cpp b/services/base/test/unittest/dms_network_adapter_test.cpp index 6a70e682..1001d36b 100644 --- a/services/base/test/unittest/dms_network_adapter_test.cpp +++ b/services/base/test/unittest/dms_network_adapter_test.cpp @@ -66,8 +66,8 @@ void DMSNetworkAdapterTest::SetUpTestCase() void DMSNetworkAdapterTest::TearDownTestCase() { - //Wait until all asyn tasks are completed before exiting the test suite - auto caseDoneNotifyTask = [&]() { + // Wait until all asyn tasks are completed before exiting the test suite + auto caseDoneNotifyTask = []() { std::lock_guard autoLock(caseDoneLock_); isCaseDone_ = true; caseDoneCondition_.notify_all(); diff --git a/services/base/test/unittest/dtbschedmgr_device_info_storage_test.cpp b/services/base/test/unittest/dtbschedmgr_device_info_storage_test.cpp index de3d8860..91a9221e 100644 --- a/services/base/test/unittest/dtbschedmgr_device_info_storage_test.cpp +++ b/services/base/test/unittest/dtbschedmgr_device_info_storage_test.cpp @@ -86,8 +86,8 @@ std::condition_variable DtbschedmgrDeviceInfoStorageTest::caseDoneCondition_; void DtbschedmgrDeviceInfoStorageTest::TearDownTestCase() { - //Wait until all asyn tasks are completed before exiting the test suite - auto caseDoneNotifyTask = [&]() { + // Wait until all asyn tasks are completed before exiting the test suite + auto caseDoneNotifyTask = []() { std::lock_guard autoLock(caseDoneLock_); isCaseDone_ = true; caseDoneCondition_.notify_all(); diff --git a/services/dtbabilitymgr/test/unittest/distributed_ability_manager_service_test.cpp b/services/dtbabilitymgr/test/unittest/distributed_ability_manager_service_test.cpp index c71ab331..1e7e0725 100644 --- a/services/dtbabilitymgr/test/unittest/distributed_ability_manager_service_test.cpp +++ b/services/dtbabilitymgr/test/unittest/distributed_ability_manager_service_test.cpp @@ -49,14 +49,14 @@ void DistributedAbilityManagerServiceTest::SetUpTestCase() void DistributedAbilityManagerServiceTest::TearDownTestCase() { - //Wait until all asyn tasks are completed before exiting the test suite - auto caseDoneNotifyTask = [&]() { + // Wait until all asyn tasks are completed before exiting the test suite + auto caseDoneNotifyTask = []() { std::lock_guard autoLock(caseDoneLock_); isCaseDone_ = true; caseDoneCondition_.notify_all(); }; if (DistributedSchedMissionManager::GetInstance().distributedDataStorage_ != nullptr) { - std::shared_ptr dmsDataStorageHandler = + std::shared_ptr dmsDataStorageHandler = DistributedSchedMissionManager::GetInstance().distributedDataStorage_->dmsDataStorageHandler_; if (dmsDataStorageHandler != nullptr) { dmsDataStorageHandler->PostTask(caseDoneNotifyTask); diff --git a/services/dtbschedmgr/test/unittest/distributed_sched_continuation_test.cpp b/services/dtbschedmgr/test/unittest/distributed_sched_continuation_test.cpp index 2243fd40..4b6bacf9 100644 --- a/services/dtbschedmgr/test/unittest/distributed_sched_continuation_test.cpp +++ b/services/dtbschedmgr/test/unittest/distributed_sched_continuation_test.cpp @@ -349,7 +349,7 @@ HWTEST_F(DSchedContinuationTest, ContinueLocalMission_001, TestSize.Level1) WantParams wantParams; int32_t ret = DistributedSchedService::GetInstance().ContinueLocalMission(deviceId, missionId, callback, wantParams); - EXPECT_TRUE(INVALID_PARAMETERS_ERR == ret); + EXPECT_NE(ret, ERR_OK); DTEST_LOG << "DSchedContinuationTest ContinueLocalMission_001 end" << std::endl; } diff --git a/services/dtbschedmgr/test/unittest/mock_remote_stub.h b/services/dtbschedmgr/test/unittest/mock_remote_stub.h index 5c5447f3..35de3f6a 100644 --- a/services/dtbschedmgr/test/unittest/mock_remote_stub.h +++ b/services/dtbschedmgr/test/unittest/mock_remote_stub.h @@ -29,7 +29,7 @@ public: class MockRemoteStub : public IRemoteStub { public: ~MockRemoteStub() = default; - virtual int32_t OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, + int32_t OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) override { return 0;