| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(test): isolate test service DB to protect real notificationdb Make GetAnsNotificationRdbMgrInstance() a weak symbol and override it in a single shared test mock (frameworks/test/moduletest/mock) so the in-process service constructed by tests operates on an isolated temp DB (/data/local/tmp/ans_rdb_test_<pid>/notificationdb_test.db) instead of the real notificationdb.db. All affected test targets reference the single mock via absolute path (no duplicate files). Root cause: tests that call ClearNotificationInRestoreFactorySettings() invoke rdbDataManager_->Destroy() which deletes the DB file. Without an RDB mock, the real notificationdb.db is deleted on device, wiping real data. Scope: all tests calling ClearNotificationInRestoreFactorySettings without an RDB mock - ans_module_test (services/test/moduletest), 10 UT targets in services/ans/test/unittest (permission_filter, notification_service, live_view, slot, utils, snooze_delay, service_publish, preferences, ringtone, geofence), aggregation_test, badge_manager_test, plus the publish/slot moduletest. Review fixes: DestroyTestRdb now resets the static instance and removes the temp dir (rmdir); mkdir checks errno==EEXIST. Empty NtfRdbHook is intentional (nullptr-safe per docs, avoids pulling hisysevent-dependent production hooks into tests; hooks are DFX/observational and do not affect CRUD). Verified on device: slot MST 12/12 pass both runs; real notificationdb.db mtime unchanged; full unittest 99.5% pass (3255/3273), 18 failures in unmodified binaries (pre-existing). Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: I7e076d07003d6e30813e0f0f72e7f6ad38b8186d Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> | 18 天前 | |
IssueNo: I5QF22 Description: delete unused bundlemgr api Sig:SIG_ApplicaitonFramework Feature or Bugfix:Feature Binary Source:No Signed-off-by: xsz233 <xushizhe@huawei.com> | 3 年前 | |
替换std::mutex Signed-off-by: songbao1 <luojingsong@h-partners.com> | 1 年前 | |
add system app check Signed-off-by: fangJinliang1 <fangjinliang1@huawei.com> Change-Id: I7a96f219d75fb6ab893a0002d94f3568978b2c1f Signed-off-by: fangJinliang1 <fangjinliang1@huawei.com> | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 18 天前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 3 年前 |