From 5c6f86b0974b608c2835d978620be8f27b6177d7 Mon Sep 17 00:00:00 2001 From: du-zhihai Date: Fri, 16 Sep 2022 11:39:19 +0800 Subject: [PATCH] =?UTF-8?q?DMS=E4=B8=8A=E6=8A=A5=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=A1=A5=E5=85=85=E6=B5=8B=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: du-zhihai Change-Id: Icb9990a63bc642e6f06de769775a212e70f02937 --- .../unittest/distributed_sched_service_test.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/services/dtbschedmgr/test/unittest/distributed_sched_service_test.cpp b/services/dtbschedmgr/test/unittest/distributed_sched_service_test.cpp index 9eac2d36..9493a9db 100644 --- a/services/dtbschedmgr/test/unittest/distributed_sched_service_test.cpp +++ b/services/dtbschedmgr/test/unittest/distributed_sched_service_test.cpp @@ -1006,27 +1006,36 @@ HWTEST_F(DistributedSchedServiceTest, StartContinuation_001, TestSize.Level1) want, missionId, callerUid, status, accessToken); EXPECT_EQ(static_cast(INVALID_REMOTE_PARAMETERS_ERR), ret); CallerInfo callerInfo; + ConnectInfo connectInfo; /** * @tc.steps: step1. ReportDistributedComponentChange when componentChangeHandler_ is nullptr */ DistributedSchedService::GetInstance().componentChangeHandler_ = nullptr; DistributedSchedService::GetInstance().ReportDistributedComponentChange(callerInfo, 1, IDistributedSched::CALL, IDistributedSched::CALLER); - /** - * @tc.steps: step2. ReportDistributedComponentChange when componentChangeHandler_ is not nullptr + * @tc.steps: step2. ReportDistributedComponentChange when componentChangeHandler_ is nullptr + */ + DistributedSchedService::GetInstance().ReportDistributedComponentChange(connectInfo, + 1, IDistributedSched::CALL, IDistributedSched::CALLEE); + /** + * @tc.steps: step3. ReportDistributedComponentChange when componentChangeHandler_ is not nullptr */ auto runner = AppExecFwk::EventRunner::Create("DmsComponentChange"); DistributedSchedService::GetInstance().componentChangeHandler_ = std::make_shared(runner); DistributedSchedService::GetInstance().ReportDistributedComponentChange(callerInfo, 1, IDistributedSched::CALL, IDistributedSched::CALLER); /** - * @tc.steps: step3. ReportDistributedComponentChange when callerInfo.bundleNames is not empty + * @tc.steps: step4. ReportDistributedComponentChange when callerInfo.bundleNames is not empty */ callerInfo.bundleNames.emplace_back("bundleName"); DistributedSchedService::GetInstance().ReportDistributedComponentChange(callerInfo, 1, IDistributedSched::CALL, IDistributedSched::CALLER); - DTEST_LOG << "DSchedContinuationTest StartContinuation_001 end" << std::endl; + /** + * @tc.steps: step5. ReportDistributedComponentChange when componentChangeHandler_ is not nullptr + */ + DistributedSchedService::GetInstance().ReportDistributedComponentChange(connectInfo, + 1, IDistributedSched::CALL, IDistributedSched::CALLEE); } /**