| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(test): auto-isolate all test RDB via ans_service_sources_test wrapper Add ans_service_sources_test (ohos_static_library, testonly) that wraps ans_service_sources and automatically provides the mock_ans_rdb_mgr_builder strong override (isolated temp DB). All test targets now depend on ans_service_sources_test instead of ans_service_sources, so new test suites automatically get RDB isolation without manual changes. ans_service_sources_test_config propagates all needed include paths (ans headers, rdb headers, mock headers) to test targets. The mock source (mock_ans_rdb_mgr_builder.cpp) is compiled once into the static lib, avoiding include-path propagation issues with source_set recompilation. Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: Ieafd58f9f1e1433e3381c89a8c105f7191662986 Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> | 22 天前 | |
Co-Authored-By: hanwenhui Signed-off-by: hanwenhui <hanwenhui2@h-partners.com> | 9 天前 | |
修复tdd报错 Signed-off-by: x00524330 <xujianhua9@huawei.com> Change-Id: Ia7f4fd90a5a934f56b3f2fe8f6fc046d84c71ad1 | 2 年前 | |
fix(ans): fix cross-SO singleton issue by adding AnsNotification::GetInstance() DelayedSingleton<AnsNotification>::GetInstance() returns different singleton objects in different shared libraries because the template's static members (instance_, mutex_) have vague linkage (COMDAT) and are hidden per-SO by -fvisibility=hidden + version scripts. Solution: 1. Add AnsNotification::GetInstance() using function-local static (C++11 thread-safe, defined out-of-line in ans_notification.cpp within libans_innerkits, symbol exported via *Ans* in .map) 2. Replace ALL callers (NAPI/ANI/Tools/Tests/CJ FFI) from DelayedSingleton<AnsNotification>::GetInstance() to AnsNotification::GetInstance() 3. Fix singleton.h include hygiene: - Add #include singleton.h to 34 files that use Singleton<>, DelayedSingleton<>, DECLARE_SINGLETON etc. but relied on transitive includes - Add #include nocopyable.h to 7 files that use DISALLOW_COPY_AND_MOVE but relied on transitive includes - Remove #include singleton.h from 70 files that no longer use any singleton.h symbols after the DelayedSingleton replacement The function-local static in ans_notification.cpp lives in libans_innerkits.so's data segment. AnsNotification::GetInstance() is a non-inline member function compiled only in libans_innerkits.so and exported via *Ans* pattern in libans_innerkits.map. All SOs call this exported function through dynamic linking, sharing the single instance. Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: I1089cfa5bb010daf37c68333a1e71c55fc1f16f3 | 29 天前 | |
test(ans): optimize unit test sleep efficiency with SelfClean mechanism Replace fixed-duration sleep calls in unit/module tests with direct SelfClean(false) / WaitForFfrtQueue() calls, eliminating ~137 sleep calls across 9 test files. This reduces test execution time and improves stability by synchronizing on actual task completion instead of fixed timeouts. Key changes: - Replace sleep with direct SelfClean(false) calls in 9 test files - Replace sleep with direct WaitForFfrtQueue() in subscriber manager test - Clean TearDown residual sleep, add StopCacheCleanupTimer() - Restore 1000ms sleep for 4 rate-limited publish test cases - No new files, no BUILD.gn changes, no macro abstraction Test results: 534/534 (100%) passed on ARM device with CFI disabled. Change-Id: I2b68edbdca43f183f55f681e0701fb543b668240 Change-Id: I3f3ddc0868105a2c6ebdd3232fae9188429114fd Change-Id: I08f7b9b8b45a2d90bd0580f0e92059b03d0aa514 Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: I44098e741e681234033e3ae9cdf8427205e86bfa | 1 个月前 | |
feat(notification): add batch slot query API and optimize getAllNotificationEnabledBundles Add isNotificationSlotEnabledByBundles batch slot query API to query multiple bundles' slot enabled state in a single IPC call, avoiding the performance degradation caused by LRU cache misses in the single-query path. Optimize getAllNotificationEnabledBundles to only query _enabledNotification keys (filtered by VALUE IN ('1','3')) and parse bundleName/uid from the key, reducing I/O by ~66%. - Add IDL method GetEnabledForBundleSlots with OrderedMap output - Add full-stack implementation: server, DB, client, helper, NAPI, ANI - Unify single query path to bypass LRU cache via batch query internally - Add QueryDataInKeys batched IN query and QueryEnabledBundles in RDB layer - Add unit tests for server, DB layer, and RDB batch query - Add performance test (300-bundle batch query < 30ms target) Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Co-Authored-By: Agent Change-Id: I59ed3041c14b33a2fbe69517d6b366597f03b11b | 2 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 22 天前 | ||
| 9 天前 | ||
| 2 年前 | ||
| 29 天前 | ||
| 1 个月前 | ||
| 2 个月前 |