From 413ff14629b14f8f6cdb184ee2c0f85bc3a92fd6 Mon Sep 17 00:00:00 2001 From: caihaoting Date: Wed, 19 Mar 2025 19:52:47 +0800 Subject: [PATCH] Add KvStoreObserver UT testcase for coverage Signed-off-by: caihaoting --- .../unittest/common/common/distributeddb_tools_unit_test.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/frameworks/libs/distributeddb/test/unittest/common/common/distributeddb_tools_unit_test.cpp b/frameworks/libs/distributeddb/test/unittest/common/common/distributeddb_tools_unit_test.cpp index 0dd4ecc2662..7d38ced73b5 100644 --- a/frameworks/libs/distributeddb/test/unittest/common/common/distributeddb_tools_unit_test.cpp +++ b/frameworks/libs/distributeddb/test/unittest/common/common/distributeddb_tools_unit_test.cpp @@ -762,6 +762,7 @@ void KvStoreObserverUnitTest::OnChange(DistributedDB::Origin origin, const std:: { callCount_++; changedData_[data.tableName] = data; + KvStoreObserver::OnChange(origin, originalId, std::move(data)); LOGD("data change when cloud sync, origin = %d, tableName = %s", origin, data.tableName.c_str()); } -- Gitee