From 64ff58d90dd9e47f7d5df48f4e21e3c8455c0aab Mon Sep 17 00:00:00 2001 From: zhangdi Date: Tue, 6 May 2025 20:56:52 +0800 Subject: [PATCH] =?UTF-8?q?UT=E5=A4=B1=E8=B4=A5=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangdi --- .../service/test/rdb_general_store_test.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/distributeddataservice/service/test/rdb_general_store_test.cpp b/services/distributeddataservice/service/test/rdb_general_store_test.cpp index c6f60f81f..24e4dfab6 100644 --- a/services/distributeddataservice/service/test/rdb_general_store_test.cpp +++ b/services/distributeddataservice/service/test/rdb_general_store_test.cpp @@ -854,7 +854,7 @@ HWTEST_F(RdbGeneralStoreTest, Release, TestSize.Level1) HWTEST_F(RdbGeneralStoreTest, SetDistributedTables, TestSize.Level1) { std::vector tables = { "table1", "table2" }; - int32_t type = 0; + int32_t type = DistributedTableType::DISTRIBUTED_DEVICE; std::vector references; auto result = store->SetDistributedTables(tables, type, references); EXPECT_EQ(result, GeneralError::E_ALREADY_CLOSED); @@ -869,6 +869,9 @@ HWTEST_F(RdbGeneralStoreTest, SetDistributedTables, TestSize.Level1) EXPECT_EQ(result, GeneralError::E_ERROR); MockRelationalStoreDelegate::gTestResult = true; result = store->SetDistributedTables(tables, type, references); + EXPECT_EQ(result, GeneralError::E_OK); + type = DistributedTableType::DISTRIBUTED_CLOUD; + result = store->SetDistributedTables(tables, type, references); EXPECT_EQ(result, GeneralError::E_ERROR); } -- Gitee