From 9b12ee5d8413cf274be2c2934e421d3b6b1116cd Mon Sep 17 00:00:00 2001 From: zhushuanghong Date: Mon, 21 Apr 2025 22:56:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhushuanghong --- bundle.json | 1 - frameworks/extension/BUILD.gn | 1 + frameworks/test/unittest/BUILD.gn | 4 +- .../unittest/src/work_sched_client_test.cpp | 30 ++++---- .../test/unittest/src/workinfo_test.cpp | 68 +++++++++---------- .../work_scheduler_jsunittest/BUILD.gn | 2 +- services/native/include/event_publisher.h | 12 ++-- services/native/include/ipolicy_listener.h | 4 +- services/native/include/work_conn_manager.h | 3 - services/native/include/work_policy_manager.h | 1 - .../native/include/work_scheduler_service.h | 10 +-- services/native/src/event_publisher.cpp | 12 ++-- services/native/src/work_status.cpp | 1 + services/test/BUILD.gn | 2 +- services/test/src/event_publisher_test.cpp | 4 +- .../src/scheduler_bg_task_subscriber_test.cpp | 2 +- services/test/src/watchdog_test.cpp | 10 +-- services/test/src/work_conn_manager_test.cpp | 24 +++---- services/test/src/work_sched_config_test.cpp | 2 +- 19 files changed, 95 insertions(+), 98 deletions(-) diff --git a/bundle.json b/bundle.json index 76669aa..3c317d4 100644 --- a/bundle.json +++ b/bundle.json @@ -44,7 +44,6 @@ "netmanager_base", "time_service", "init", - "idl_tool", "data_share", "config_policy", "hiview", diff --git a/frameworks/extension/BUILD.gn b/frameworks/extension/BUILD.gn index 786e674..cb1035f 100644 --- a/frameworks/extension/BUILD.gn +++ b/frameworks/extension/BUILD.gn @@ -51,6 +51,7 @@ ohos_shared_library("workschedextension") { external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", + "ability_runtime:abilitykit_native", "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "ability_runtime:app_context", diff --git a/frameworks/test/unittest/BUILD.gn b/frameworks/test/unittest/BUILD.gn index f27f5be..de6cc06 100644 --- a/frameworks/test/unittest/BUILD.gn +++ b/frameworks/test/unittest/BUILD.gn @@ -14,7 +14,7 @@ import("//build/test.gni") import("//foundation/resourceschedule/work_scheduler/workscheduler.gni") -module_output_path = "work_scheduler/work_scheduler" +module_output_path = "work_scheduler/work_info_unittest" ohos_systemtest("WorkSchedulerWorkInfoTest") { module_out_path = module_output_path @@ -50,7 +50,7 @@ ohos_systemtest("WorkSchedulerWorkInfoTest") { } ohos_unittest("WorkSchedulerClientTest") { - module_out_path = module_output_path + module_out_path = "work_scheduler/client_unittest" cflags_cc = [ "-Dprivate=public", diff --git a/frameworks/test/unittest/src/work_sched_client_test.cpp b/frameworks/test/unittest/src/work_sched_client_test.cpp index c0826ae..e5cc3cd 100644 --- a/frameworks/test/unittest/src/work_sched_client_test.cpp +++ b/frameworks/test/unittest/src/work_sched_client_test.cpp @@ -40,7 +40,7 @@ public: * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_001, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_001, TestSize.Level1) { WorkInfo workInfo = WorkInfo(); auto ret = WorkSchedulerSrvClient::GetInstance().StartWork(workInfo); @@ -53,7 +53,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_001, TestSize.Level0) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_002, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_002, TestSize.Level1) { WorkInfo workInfo = WorkInfo(); auto ret = WorkSchedulerSrvClient::GetInstance().StopWork(workInfo); @@ -66,7 +66,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_002, TestSize.Level0) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_003, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_003, TestSize.Level1) { WorkInfo workInfo = WorkInfo(); auto ret = WorkSchedulerSrvClient::GetInstance().StopAndCancelWork(workInfo); @@ -79,7 +79,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_003, TestSize.Level0) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_004, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_004, TestSize.Level1) { auto ret = WorkSchedulerSrvClient::GetInstance().StopAndClearWorks(); EXPECT_EQ(ret, ERR_OK); @@ -91,7 +91,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_004, TestSize.Level0) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_005, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_005, TestSize.Level1) { int32_t workId = 1; bool result; @@ -105,7 +105,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_005, TestSize.Level0) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_006, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_006, TestSize.Level1) { int32_t workId = 1; std::shared_ptr work; @@ -122,7 +122,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_006, TestSize.Level0) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_007, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_007, TestSize.Level1) { std::list> workInfos; ErrCode ret = WorkSchedulerSrvClient::GetInstance().ObtainAllWorks(workInfos); @@ -135,7 +135,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_007, TestSize.Level0) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_008, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_008, TestSize.Level1) { sptr sam = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); sptr remoteObject_ = sam->CheckSystemAbility(WORK_SCHEDULE_SERVICE_ID); @@ -153,7 +153,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_008, TestSize.Level0) * @tc.type: FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_009, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_009, TestSize.Level1) { sptr sam = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); sptr remoteObject_ = sam->CheckSystemAbility(WORK_SCHEDULE_SERVICE_ID); @@ -169,7 +169,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_009, TestSize.Level0) * @tc.type: FUNC * @tc.require: issue:#I992IA */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_010, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_010, TestSize.Level1) { int32_t uid = -1; ErrCode ret = WorkSchedulerSrvClient::GetInstance().PauseRunningWorks(uid); @@ -182,7 +182,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_010, TestSize.Level0) * @tc.type: FUNC * @tc.require: issue:#I992IA */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_011, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_011, TestSize.Level1) { int32_t uid = IPCSkeleton::GetCallingUid(); ErrCode ret = WorkSchedulerSrvClient::GetInstance().PauseRunningWorks(uid); @@ -195,7 +195,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_011, TestSize.Level0) * @tc.type: FUNC * @tc.require: issue:#I992IA */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_012, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_012, TestSize.Level1) { int32_t uid = -1; ErrCode ret = WorkSchedulerSrvClient::GetInstance().ResumePausedWorks(uid); @@ -208,7 +208,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_012, TestSize.Level0) * @tc.type: FUNC * @tc.require: issue:#I992IA */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_013, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_013, TestSize.Level1) { int32_t uid = IPCSkeleton::GetCallingUid(); ErrCode ret = WorkSchedulerSrvClient::GetInstance().ResumePausedWorks(uid); @@ -221,7 +221,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_013, TestSize.Level0) * @tc.type: FUNC * @tc.require: issue:#I9EKGI */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_014, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_014, TestSize.Level1) { std::list> workInfos; ErrCode ret = WorkSchedulerSrvClient::GetInstance().GetAllRunningWorks(workInfos); @@ -234,7 +234,7 @@ HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_014, TestSize.Level0) * @tc.type: FUNC * @tc.require: issue:#I9EKGI */ -HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_015, TestSize.Level0) +HWTEST_F(WorkSchedClientTest, WorkSchedClientTest_015, TestSize.Level1) { int32_t sourceType = 1; std::string configData = ""; diff --git a/frameworks/test/unittest/src/workinfo_test.cpp b/frameworks/test/unittest/src/workinfo_test.cpp index bcc1d25..742488d 100644 --- a/frameworks/test/unittest/src/workinfo_test.cpp +++ b/frameworks/test/unittest/src/workinfo_test.cpp @@ -48,7 +48,7 @@ void WorkInfoTest::TearDown() * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest001, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest001, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); workInfo.SetWorkId(1); @@ -61,7 +61,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest001, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest002, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest002, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); workInfo.SetElement("bundle_name", "ability_name"); @@ -75,7 +75,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest002, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest003, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest003, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); workInfo.RequestPersisted(true); @@ -90,7 +90,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest003, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest004, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest004, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); EXPECT_EQ(workInfo.GetChargerType(), WorkCondition::Charger::CHARGING_UNKNOWN); @@ -104,7 +104,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest004, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest005, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest005, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); workInfo.RequestChargerType(false, WorkCondition::Charger::CHARGING_UNPLUGGED); @@ -117,7 +117,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest005, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest006, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest006, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); workInfo.RequestBatteryStatus(WorkCondition::BatteryStatus::BATTERY_STATUS_LOW_OR_OKAY); @@ -130,7 +130,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest006, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest007, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest007, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); workInfo.RequestBatteryStatus(WorkCondition::BatteryStatus::BATTERY_STATUS_LOW); @@ -143,7 +143,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest007, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: SR000GGTN6 AR000GH896 AR000GH897 AR000GH898 */ -HWTEST_F (WorkInfoTest, WorkInfoTest008, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest008, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); EXPECT_EQ(workInfo.GetBatteryStatus(), WorkCondition::BatteryStatus::BATTERY_UNKNOWN); @@ -157,7 +157,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest008, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: SR000GGTN9 AR000GH89M */ -HWTEST_F (WorkInfoTest, WorkInfoTest009, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest009, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); EXPECT_EQ(workInfo.GetStorageLevel(), WorkCondition::Storage::STORAGE_UNKNOWN); @@ -171,7 +171,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest009, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: SR000GGTN8 AR000GH89J AR000GH89K AR000GH89L */ -HWTEST_F (WorkInfoTest, WorkInfoTest010, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest010, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); workInfo.RequestStorageLevel(WorkCondition::Storage::STORAGE_LEVEL_LOW); @@ -184,7 +184,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest010, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: SR000GGTNB AR000GH89Q */ -HWTEST_F (WorkInfoTest, WorkInfoTest011, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest011, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); workInfo.RequestStorageLevel(WorkCondition::Storage::STORAGE_LEVEL_OKAY); @@ -197,7 +197,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest011, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: SR000GGTNA AR000GH89P AR000GH89N AR000GH89O */ -HWTEST_F (WorkInfoTest, WorkInfoTest012, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest012, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); EXPECT_EQ(workInfo.GetNetworkType(), WorkCondition::Network::NETWORK_UNKNOWN); @@ -211,7 +211,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest012, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: SR000GGTNA AR000GH89P AR000GH89N AR000GH89O */ -HWTEST_F (WorkInfoTest, WorkInfoTest013, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest013, Function | MediumTest | Level0) { uint32_t timeInterval = 120; WorkInfo workInfo = WorkInfo(); @@ -229,7 +229,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest013, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: SR000GGTNA AR000GH89P AR000GH89N AR000GH89O */ -HWTEST_F (WorkInfoTest, WorkInfoTest014, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest014, Function | MediumTest | Level0) { uint32_t timeInterval = 120; WorkInfo workInfo = WorkInfo(); @@ -246,7 +246,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest014, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest015, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest015, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); EXPECT_EQ(workInfo.GetBatteryLevel(), INVALID_VALUE); @@ -260,7 +260,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest015, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest016, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest016, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); workInfo.RefreshUid(0); @@ -273,7 +273,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest016, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest017, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest017, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); AAFwk::WantParams extras; @@ -292,7 +292,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest017, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest018, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest018, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); workInfo.GetConditionMap(); @@ -307,7 +307,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest018, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTestJson001, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTestJson001, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); std::string res = workInfo.ParseToJsonStr(); @@ -345,7 +345,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTestJson001, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTestJson002, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTestJson002, Function | MediumTest | Level0) { using namespace OHOS::WorkScheduler; WorkInfo workInfo = WorkInfo(); @@ -402,7 +402,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTestJson002, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTestJson003, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTestJson003, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); Json::Value root; @@ -459,7 +459,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTestJson003, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTestJson004, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTestJson004, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); Json::Value root; @@ -485,7 +485,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTestJson004, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTestJson005, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTestJson005, Function | MediumTest | Level0) { using namespace OHOS::WorkScheduler; WorkInfo workInfo = WorkInfo(); @@ -512,7 +512,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTestJson005, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTestJson006, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTestJson006, Function | MediumTest | Level0) { using namespace OHOS::WorkScheduler; WorkInfo workInfo = WorkInfo(); @@ -551,7 +551,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTestJson006, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest019, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest019, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); workInfo.SetElement("bundle_name", "ability_name"); @@ -599,7 +599,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest019, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest020, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest020, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); workInfo.SetElement("bundle_name", "ability_name"); @@ -632,7 +632,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest020, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest021, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest021, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); workInfo.SetCallBySystemApp(true); @@ -645,7 +645,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest021, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkInfoTest022, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkInfoTest022, Function | MediumTest | Level0) { WorkInfo workInfo = WorkInfo(); time_t result; @@ -661,7 +661,7 @@ HWTEST_F (WorkInfoTest, WorkInfoTest022, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkSchedUtils001, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkSchedUtils001, Function | MediumTest | Level0) { int32_t res = WorkSchedUtils::GetCurrentAccountId(); EXPECT_NE(res, -1000); @@ -673,7 +673,7 @@ HWTEST_F (WorkInfoTest, WorkSchedUtils001, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkSchedUtils002, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkSchedUtils002, Function | MediumTest | Level0) { bool res = WorkSchedUtils::IsIdActive(0); EXPECT_FALSE(res); @@ -685,7 +685,7 @@ HWTEST_F (WorkInfoTest, WorkSchedUtils002, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkSchedUtils003, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkSchedUtils003, Function | MediumTest | Level0) { int32_t res = WorkSchedUtils::GetUserIdByUid(1); EXPECT_EQ(res, 0); @@ -699,7 +699,7 @@ HWTEST_F (WorkInfoTest, WorkSchedUtils003, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkSchedUtils004, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkSchedUtils004, Function | MediumTest | Level0) { std::string partialPath; std::string fullPath; @@ -725,7 +725,7 @@ HWTEST_F (WorkInfoTest, WorkSchedUtils004, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueI5Y6YK */ -HWTEST_F (WorkInfoTest, WorkSchedUtils006, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, WorkSchedUtils006, Function | MediumTest | Level0) { bool res = WorkSchedUtils::IsSystemApp(); EXPECT_EQ(res, false); @@ -737,7 +737,7 @@ HWTEST_F (WorkInfoTest, WorkSchedUtils006, Function | MediumTest | Level2) * @tc.type FUNC * @tc.require: issueIAHY0B */ -HWTEST_F (WorkInfoTest, GetSaId001, Function | MediumTest | Level2) +HWTEST_F (WorkInfoTest, GetSaId001, Function | MediumTest | Level0) { int32_t saId = 5300; WorkInfo workInfo = WorkInfo(); diff --git a/interfaces/test/unittest/work_scheduler_jsunittest/BUILD.gn b/interfaces/test/unittest/work_scheduler_jsunittest/BUILD.gn index 40b1a70..8f0e6ec 100644 --- a/interfaces/test/unittest/work_scheduler_jsunittest/BUILD.gn +++ b/interfaces/test/unittest/work_scheduler_jsunittest/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/test.gni") -module_output_path = "work_scheduler/work_scheduler" +module_output_path = "work_scheduler/interfaces" ohos_js_unittest("WorkSchedulerJsTest") { module_out_path = module_output_path diff --git a/services/native/include/event_publisher.h b/services/native/include/event_publisher.h index af822b7..fb02da4 100644 --- a/services/native/include/event_publisher.h +++ b/services/native/include/event_publisher.h @@ -32,35 +32,35 @@ public: * @param eventType The event type. * @param eventValue The event value. */ - void PublishEvent(std::string &result, const std::string &eventType, const std::string &eventValue); + void PublishEvent(std::string &result, std::string &eventType, std::string &eventValue); /** * @brief Publish network event. * * @param result The dump result. * @param eventValue The event value. */ - void PublishNetworkEvent(std::string &result, const std::string &eventValue); + void PublishNetworkEvent(std::string &result, std::string &eventValue); /** * @brief Publish charging event. * * @param result The dump result. * @param eventValue The event value. */ - void PublishChargingEvent(std::string &result, const std::string &eventValue); + void PublishChargingEvent(std::string &result, std::string &eventValue); /** * @brief Publish storage event. * * @param result The dump result. * @param eventValue The event value. */ - void PublishStorageEvent(std::string &result, const std::string &eventValue); + void PublishStorageEvent(std::string &result, std::string &eventValue); /** * @brief Publish battery status event. * * @param result The dump result. * @param eventValue The event value. */ - void PublishBatteryStatusEvent(std::string &result, const std::string &eventValue); + void PublishBatteryStatusEvent(std::string &result, std::string &eventValue); /** * @brief Dump event info. * @@ -68,7 +68,7 @@ public: * @param eventType The event type. * @param eventValue The event value. */ - void Dump(std::string &result, const std::string &eventType, const std::string &eventValue); + void Dump(std::string &result, std::string &eventType, std::string &eventValue); }; } // namespace WorkScheduler } // namespace OHOS diff --git a/services/native/include/ipolicy_listener.h b/services/native/include/ipolicy_listener.h index 94e5da3..e37e568 100644 --- a/services/native/include/ipolicy_listener.h +++ b/services/native/include/ipolicy_listener.h @@ -37,13 +37,13 @@ public: * * @return True if success,else false. */ - virtual bool Start() = 0; + virtual bool Start(); /** * @brief Stop. * * @return True if success,else false. */ - virtual bool Stop() = 0; + virtual bool Stop(); }; } // namesapce WorkScheduler } // namespace OHOS diff --git a/services/native/include/work_conn_manager.h b/services/native/include/work_conn_manager.h index cdc8cbf..125e6e2 100644 --- a/services/native/include/work_conn_manager.h +++ b/services/native/include/work_conn_manager.h @@ -44,15 +44,12 @@ public: * @return True if success,else false. */ bool StopWork(std::shared_ptr workStatus, bool isTimeOut); - private: void RemoveConnInfo(std::string &workId); void AddConnInfo(std::string &workId, sptr &connection); sptr GetConnInfo(std::string &workId); bool DisConnect(sptr connect); void WriteStartWorkEvent(std::shared_ptr workStatus); - -private: ffrt::mutex connMapMutex_; std::map> connMap_; std::map eventIdMap_; diff --git a/services/native/include/work_policy_manager.h b/services/native/include/work_policy_manager.h index d9eef0f..b82ad81 100644 --- a/services/native/include/work_policy_manager.h +++ b/services/native/include/work_policy_manager.h @@ -306,7 +306,6 @@ private: bool IsSpecialScene(std::shared_ptr topWork, int32_t runningCount); std::string GetConditionString(const std::shared_ptr workStatus); -private: const std::weak_ptr wss_; std::shared_ptr workConnManager_; std::shared_ptr handler_; diff --git a/services/native/include/work_scheduler_service.h b/services/native/include/work_scheduler_service.h index b006c29..947995e 100644 --- a/services/native/include/work_scheduler_service.h +++ b/services/native/include/work_scheduler_service.h @@ -317,8 +317,8 @@ private: void DumpAllInfo(std::string& result); bool CheckWorkInfo(WorkInfo& workInfo, int32_t& uid); bool StopWorkInner(std::shared_ptr workStatus, int32_t uid, const bool needCancel, bool isTimeOut); - int32_t StartWorkInner(const WorkInfo& workInfo); bool CheckCondition(WorkInfo& workInfo); + int32_t StartWorkInner(const WorkInfo& workInfo); bool IsBaseAbilityReady(); void DumpUsage(std::string& result); void DumpParamSet(std::string& key, std::string& value, std::string& result); @@ -328,17 +328,17 @@ private: bool AllowDump(); void DumpProcessForEngMode(std::vector& argsInStr, std::string& result); void DumpProcessForUserMode(std::vector& argsInStr, std::string& result); - bool GetJsonFromFile(const char* filePath, Json::Value& root); + bool GetJsonFromFile(const char *filePath, Json::Value& root); bool GetUidByBundleName(const std::string& bundleName, int32_t& uid); void InitWorkInner(); void AddWorkInner(WorkInfo& workInfo); std::list> ReadPreinstalledWorks(); - void LoadWorksFromFile(const char *path, std::list> &workInfos); + void LoadWorksFromFile(const char *path, std::list>& workInfos); void LoadExemptionBundlesFromFile(const char *path); void InitPersistedWork(); bool CheckProcessName(); - bool GetAppIndexAndBundleNameByUid(int32_t uid, int32_t &appIndex, std::string &bundleName); - bool CheckExtensionInfos(WorkInfo &workInfo, int32_t uid); + bool GetAppIndexAndBundleNameByUid(int32_t uid, int32_t& appIndex, std::string& bundleName); + bool CheckExtensionInfos(WorkInfo& workInfo, int32_t uid); void DumpLoadSaWorks(const std::string &saIdStr, const std::string &uidStr, std::string &result); std::string DumpExemptionBundles(); void LoadMinRepeatTimeFromFile(const char *path); diff --git a/services/native/src/event_publisher.cpp b/services/native/src/event_publisher.cpp index d233f0b..5a19623 100644 --- a/services/native/src/event_publisher.cpp +++ b/services/native/src/event_publisher.cpp @@ -43,7 +43,7 @@ namespace { static const std::string EV_STORAGE_OKAY = "ok"; } -void EventPublisher::Dump(std::string &result, const std::string &eventType, const std::string &eventValue) +void EventPublisher::Dump(std::string &result, std::string &eventType, std::string &eventValue) { if (eventType == "event" && eventValue == "info") { result.append("event info:\n") @@ -62,7 +62,7 @@ void EventPublisher::Dump(std::string &result, const std::string &eventType, con } } -void EventPublisher::PublishEvent(std::string &result, const std::string &eventType, const std::string &eventValue) +void EventPublisher::PublishEvent(std::string &result, std::string &eventType, std::string &eventValue) { if (eventType == NETWORK) { PublishNetworkEvent(result, eventValue); @@ -77,7 +77,7 @@ void EventPublisher::PublishEvent(std::string &result, const std::string &eventT } } -void EventPublisher::PublishNetworkEvent(std::string &result, const std::string &eventValue) +void EventPublisher::PublishNetworkEvent(std::string &result, std::string &eventValue) { #ifdef COMMUNICATION_NETMANAGER_BASE_ENABLE EventFwk::Want want; @@ -105,7 +105,7 @@ void EventPublisher::PublishNetworkEvent(std::string &result, const std::string #endif } -void EventPublisher::PublishChargingEvent(std::string &result, const std::string &eventValue) +void EventPublisher::PublishChargingEvent(std::string &result, std::string &eventValue) { #ifdef POWERMGR_BATTERY_MANAGER_ENABLE EventFwk::Want want; @@ -140,7 +140,7 @@ void EventPublisher::PublishChargingEvent(std::string &result, const std::string #endif // POWERMGR_BATTERY_MANAGER_ENABLE } -void EventPublisher::PublishStorageEvent(std::string &result, const std::string &eventValue) +void EventPublisher::PublishStorageEvent(std::string &result, std::string &eventValue) { EventFwk::Want want; if (eventValue == EV_STORAGE_LOW) { @@ -159,7 +159,7 @@ void EventPublisher::PublishStorageEvent(std::string &result, const std::string result.append("publish result: " + std::to_string(isSuccess)); } -void EventPublisher::PublishBatteryStatusEvent(std::string &result, const std::string &eventValue) +void EventPublisher::PublishBatteryStatusEvent(std::string &result, std::string &eventValue) { EventFwk::Want want; if (eventValue == EV_STORAGE_LOW) { diff --git a/services/native/src/work_status.cpp b/services/native/src/work_status.cpp index 0391507..df8fc06 100644 --- a/services/native/src/work_status.cpp +++ b/services/native/src/work_status.cpp @@ -373,6 +373,7 @@ bool WorkStatus::IsStandbyExemption() { auto dataManager = DelayedSingleton::GetInstance(); if (dataManager->IsInDeviceStandyRestrictlist(bundleName_)) { + WS_HILOGD("%{public}s is in restrict list", bundleName_.c_str()); return false; } if (dataManager->GetDeviceSleep()) { diff --git a/services/test/BUILD.gn b/services/test/BUILD.gn index 8473069..6fe65a2 100644 --- a/services/test/BUILD.gn +++ b/services/test/BUILD.gn @@ -15,7 +15,7 @@ import("//build/config/features.gni") import("//build/test.gni") import("//foundation/resourceschedule/work_scheduler/workscheduler.gni") -module_output_path = "work_scheduler/work_scheduler" +module_output_path = "work_scheduler/unittest" config("worksched_private_config") { include_dirs = [ "${worksched_service_path}/zidl/include", diff --git a/services/test/src/event_publisher_test.cpp b/services/test/src/event_publisher_test.cpp index dd74e88..20a5729 100644 --- a/services/test/src/event_publisher_test.cpp +++ b/services/test/src/event_publisher_test.cpp @@ -46,7 +46,7 @@ void EventPublisherTest::SetUpTestCase() * @tc.type: FUNC * @tc.require: I8GHCL */ -HWTEST_F(EventPublisherTest, publishEvent_001, TestSize.Level3) +HWTEST_F(EventPublisherTest, publishEvent_001, TestSize.Level1) { std::string result; std::string eventType; @@ -55,7 +55,7 @@ HWTEST_F(EventPublisherTest, publishEvent_001, TestSize.Level3) EXPECT_EQ(result, std::string("dump -d need right params.")); } -HWTEST_F(EventPublisherTest, Dump_001, TestSize.Level3) +HWTEST_F(EventPublisherTest, Dump_001, TestSize.Level1) { std::vector> infos = { {"event", "info"}, diff --git a/services/test/src/scheduler_bg_task_subscriber_test.cpp b/services/test/src/scheduler_bg_task_subscriber_test.cpp index 70115ba..0bc4b04 100644 --- a/services/test/src/scheduler_bg_task_subscriber_test.cpp +++ b/services/test/src/scheduler_bg_task_subscriber_test.cpp @@ -45,7 +45,7 @@ void SchedulerBgTaskSubscriberTest::SetUpTestCase() * @tc.type: FUNC * @tc.require: I8JBRY */ -HWTEST_F(SchedulerBgTaskSubscriberTest, OnRemoteDied_001, TestSize.Level3) +HWTEST_F(SchedulerBgTaskSubscriberTest, OnRemoteDied_001, TestSize.Level1) { schedulerBgTaskSubscriber_->OnRemoteDied(nullptr); EXPECT_TRUE(schedulerBgTaskSubscriber_ != nullptr); diff --git a/services/test/src/watchdog_test.cpp b/services/test/src/watchdog_test.cpp index b3dd56b..aacb57c 100644 --- a/services/test/src/watchdog_test.cpp +++ b/services/test/src/watchdog_test.cpp @@ -49,7 +49,7 @@ void WatchdogTest::SetUpTestCase() * @tc.type: FUNC * @tc.require: I8JBRY */ -HWTEST_F(WatchdogTest, watchdog_001, TestSize.Level3) +HWTEST_F(WatchdogTest, watchdog_001, TestSize.Level1) { bool result = watchdog_->AddWatchdog(1, 1); EXPECT_EQ(result, false); @@ -61,7 +61,7 @@ HWTEST_F(WatchdogTest, watchdog_001, TestSize.Level3) * @tc.type: FUNC * @tc.require: I8JBRY */ -HWTEST_F(WatchdogTest, watchdog_002, TestSize.Level3) +HWTEST_F(WatchdogTest, watchdog_002, TestSize.Level1) { bool result = watchdog_->AddWatchdog(1, 1); EXPECT_EQ(result, false); @@ -74,7 +74,7 @@ HWTEST_F(WatchdogTest, watchdog_002, TestSize.Level3) * @tc.type: FUNC * @tc.require: I8JBRY */ -HWTEST_F(WatchdogTest, watchdog_003, TestSize.Level3) +HWTEST_F(WatchdogTest, watchdog_003, TestSize.Level1) { AppExecFwk::InnerEvent::Pointer event = AppExecFwk::InnerEvent::Get(0); event = nullptr; @@ -88,7 +88,7 @@ HWTEST_F(WatchdogTest, watchdog_003, TestSize.Level3) * @tc.type: FUNC * @tc.require: I8JBRY */ -HWTEST_F(WatchdogTest, watchdog_004, TestSize.Level3) +HWTEST_F(WatchdogTest, watchdog_004, TestSize.Level1) { AppExecFwk::InnerEvent::Pointer event = AppExecFwk::InnerEvent::Get(0); watchdog_->ProcessEvent(event); @@ -101,7 +101,7 @@ HWTEST_F(WatchdogTest, watchdog_004, TestSize.Level3) * @tc.type: FUNC * @tc.require: I8JBRY */ -HWTEST_F(WatchdogTest, watchdog_005, TestSize.Level3) +HWTEST_F(WatchdogTest, watchdog_005, TestSize.Level1) { AppExecFwk::InnerEvent::Pointer event = AppExecFwk::InnerEvent::Get(0); watchdog_->service_ = nullptr; diff --git a/services/test/src/work_conn_manager_test.cpp b/services/test/src/work_conn_manager_test.cpp index a520f3f..3452515 100644 --- a/services/test/src/work_conn_manager_test.cpp +++ b/services/test/src/work_conn_manager_test.cpp @@ -54,7 +54,7 @@ void WorkConnManagerTest::SetUpTestCase() * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, AddConnInfo_001, TestSize.Level2) +HWTEST_F(WorkConnManagerTest, AddConnInfo_001, TestSize.Level1) { string workId = "u1000_123"; sptr connection; @@ -68,7 +68,7 @@ HWTEST_F(WorkConnManagerTest, AddConnInfo_001, TestSize.Level2) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, RemoveConnInfo_001, TestSize.Level2) +HWTEST_F(WorkConnManagerTest, RemoveConnInfo_001, TestSize.Level1) { string workId = "u1000_123"; sptr connection; @@ -83,7 +83,7 @@ HWTEST_F(WorkConnManagerTest, RemoveConnInfo_001, TestSize.Level2) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, GetConnInfo_001, TestSize.Level2) +HWTEST_F(WorkConnManagerTest, GetConnInfo_001, TestSize.Level1) { string workId = "u1000_123"; sptr connection; @@ -98,7 +98,7 @@ HWTEST_F(WorkConnManagerTest, GetConnInfo_001, TestSize.Level2) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, GetConnInfo_002, TestSize.Level2) +HWTEST_F(WorkConnManagerTest, GetConnInfo_002, TestSize.Level1) { workConnManager_->connMap_.clear(); string workId = "u1000_123"; @@ -112,7 +112,7 @@ HWTEST_F(WorkConnManagerTest, GetConnInfo_002, TestSize.Level2) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, StartWork_001, TestSize.Level2) +HWTEST_F(WorkConnManagerTest, StartWork_001, TestSize.Level1) { string workId = "u1000_123"; sptr connection; @@ -134,7 +134,7 @@ HWTEST_F(WorkConnManagerTest, StartWork_001, TestSize.Level2) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, StartWork_002, TestSize.Level2) +HWTEST_F(WorkConnManagerTest, StartWork_002, TestSize.Level1) { WorkInfo workInfo; workInfo.workId_ = 123; @@ -152,7 +152,7 @@ HWTEST_F(WorkConnManagerTest, StartWork_002, TestSize.Level2) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, DisConnect_001, TestSize.Level2) +HWTEST_F(WorkConnManagerTest, DisConnect_001, TestSize.Level1) { sptr connection; bool ret = workConnManager_->DisConnect(connection); @@ -165,7 +165,7 @@ HWTEST_F(WorkConnManagerTest, DisConnect_001, TestSize.Level2) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, StopWork_001, TestSize.Level2) +HWTEST_F(WorkConnManagerTest, StopWork_001, TestSize.Level1) { workConnManager_->connMap_.clear(); WorkInfo workInfo; @@ -184,7 +184,7 @@ HWTEST_F(WorkConnManagerTest, StopWork_001, TestSize.Level2) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, StopWork_002, TestSize.Level2) +HWTEST_F(WorkConnManagerTest, StopWork_002, TestSize.Level1) { string workId = "u1000_123"; sptr connection; @@ -206,7 +206,7 @@ HWTEST_F(WorkConnManagerTest, StopWork_002, TestSize.Level2) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, StopWork_003, TestSize.Level2) +HWTEST_F(WorkConnManagerTest, StopWork_003, TestSize.Level1) { MyWorkConnManager myWorkConnManager; @@ -231,7 +231,7 @@ HWTEST_F(WorkConnManagerTest, StopWork_003, TestSize.Level2) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, StopWork_004, TestSize.Level2) +HWTEST_F(WorkConnManagerTest, StopWork_004, TestSize.Level1) { MyWorkConnManager myWorkConnManager; @@ -256,7 +256,7 @@ HWTEST_F(WorkConnManagerTest, StopWork_004, TestSize.Level2) * @tc.type: FUNC * @tc.require: #I9HYBW */ -HWTEST_F(WorkConnManagerTest, WriteStartWorkEvent_001, TestSize.Level2) +HWTEST_F(WorkConnManagerTest, WriteStartWorkEvent_001, TestSize.Level1) { WorkInfo workInfo; workInfo.workId_ = 123; diff --git a/services/test/src/work_sched_config_test.cpp b/services/test/src/work_sched_config_test.cpp index f19a044..128aa89 100644 --- a/services/test/src/work_sched_config_test.cpp +++ b/services/test/src/work_sched_config_test.cpp @@ -45,7 +45,7 @@ public: * @tc.type: FUNC * @tc.require: I8GHCL */ -HWTEST_F(WorkSchedConfigTest, InitActiveGroupWhitelist_001, TestSize.Level3) +HWTEST_F(WorkSchedConfigTest, InitActiveGroupWhitelist_001, TestSize.Level1) { std::string configData = ""; DelayedSingleton::GetInstance()->InitActiveGroupWhitelist(configData); -- Gitee From f49216e31287287565a20c0d3a6ff0b326a2ac82 Mon Sep 17 00:00:00 2001 From: zhushuanghong Date: Tue, 22 Apr 2025 09:04:07 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhushuanghong --- frameworks/extension/BUILD.gn | 1 - 1 file changed, 1 deletion(-) diff --git a/frameworks/extension/BUILD.gn b/frameworks/extension/BUILD.gn index cb1035f..786e674 100644 --- a/frameworks/extension/BUILD.gn +++ b/frameworks/extension/BUILD.gn @@ -51,7 +51,6 @@ ohos_shared_library("workschedextension") { external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", - "ability_runtime:abilitykit_native", "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "ability_runtime:app_context", -- Gitee