From 10701ad1dd35c90e032ad03210f0a6bea77d6009 Mon Sep 17 00:00:00 2001 From: lianhuixxx Date: Tue, 29 Nov 2022 10:32:43 +0800 Subject: [PATCH] Fix ut deadlock Signed-off-by: lianhuixxx --- ...orage_sqlite_single_ver_natural_executor_test.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frameworks/libs/distributeddb/test/unittest/common/storage/distributeddb_storage_sqlite_single_ver_natural_executor_test.cpp b/frameworks/libs/distributeddb/test/unittest/common/storage/distributeddb_storage_sqlite_single_ver_natural_executor_test.cpp index b535fde5a0a..4be5feb470f 100644 --- a/frameworks/libs/distributeddb/test/unittest/common/storage/distributeddb_storage_sqlite_single_ver_natural_executor_test.cpp +++ b/frameworks/libs/distributeddb/test/unittest/common/storage/distributeddb_storage_sqlite_single_ver_natural_executor_test.cpp @@ -105,6 +105,18 @@ void DistributedDBStorageSQLiteSingleVerNaturalExecutorTest::TearDown(void) g_handle = nullptr; } +/** + * @tc.name: Destructor001 + * @tc.desc: Test the destructor of g_handle when the transaction is opened + * @tc.type: FUNC + * @tc.require: + * @tc.author: bty + */ +HWTEST_F(DistributedDBStorageSQLiteSingleVerNaturalExecutorTest, Destructor001, TestSize.Level1) +{ + g_handle->StartTransaction(TransactType::DEFERRED); +} + /** * @tc.name: InvalidParam001 * @tc.desc: Get Kv Data with Invalid condition -- Gitee