diff --git a/services/distributeddataservice/service/test/rdb_general_store_test.cpp b/services/distributeddataservice/service/test/rdb_general_store_test.cpp index c6f60f81f237c298ec42dfbe47bee05046d66701..24e4dfab64a3b38cc3327102ee1adce563bb553d 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); }