提交 269feda3 编写于 作者: L liuhaonan2

<liuhaonan8@huawei.com>

Signed-off-by: Nliuhaonan2 <liuhaonan8@huawei.com>
上级 12d9fbe2
...@@ -368,21 +368,21 @@ describe('kvManagerCallbackTest', function () { ...@@ -368,21 +368,21 @@ describe('kvManagerCallbackTest', function () {
try { try {
await kvManager.getKVStore(TEST_STORE_ID, options, async function (err, store) { await kvManager.getKVStore(TEST_STORE_ID, options, async function (err, store) {
console.info('SUB_DDM_DKV_KVMANAGER_CLOSEKVSTORE_0400 getKVStore success'); console.info('SUB_DDM_DKV_KVMANAGER_CLOSEKVSTORE_0400 getKVStore success');
kvStore = store; kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, function (err, data) {
await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore); if (err != undefined) {
}); console.info(`Fail to close KVStore.code is ${err.code},message is ${err.message}`);
console.info('SUB_DDM_DKV_KVMANAGER_CLOSEKVSTORE_0400 closeKVStore redo.'); }
await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore, function (err, data) { expect(err == undefined).assertTrue();
console.error('SUB_DDM_DKV_KVMANAGER_CLOSEKVSTORE_0400 closeKVStore twice ' + `, error code is ${err.code}, message is ${err.message}`); console.info('SUB_DDM_DKV_KVMANAGER_CLOSEKVSTORE_0400 closeKVStore1 done');
if (err == undefined) { done();
expect(null).assertFail(); console.info('SUB_DDM_DKV_KVMANAGER_CLOSEKVSTORE_0400 closeKVStore redo.');
} })
}); });
} catch (e) { } catch (e) {
console.error('SUB_DDM_DKV_KVMANAGER_CLOSEKVSTORE_0400 closeKVStore twice e ' + `, error code is ${e.code}, message is ${e.message}`); console.error('SUB_DDM_DKV_KVMANAGER_CLOSEKVSTORE_0400 closeKVStore twice e ' + `, error code is ${e.code}, message is ${e.message}`);
expect(null).assertFail(); // expect(null).assertFail();
} }
done();
}) })
/** /**
......
...@@ -21,10 +21,10 @@ import KvStoreResultSetTest from './KvStoreResultSetKVJsTest.js' ...@@ -21,10 +21,10 @@ import KvStoreResultSetTest from './KvStoreResultSetKVJsTest.js'
import queryTest from './QueryKVJsTest.js' import queryTest from './QueryKVJsTest.js'
import SingleKvStoreCallbackTest from './SingleKvStoreKVCallbackJsTest.js' import SingleKvStoreCallbackTest from './SingleKvStoreKVCallbackJsTest.js'
import FieldNodeTest from './FieldNodeJsTest.js' import FieldNodeTest from './FieldNodeJsTest.js'
import kvStoreBackupCallbackJsunittest from './KvStoreBackupCallbackJsTest.js'
import kvStoreBackupPromiseJsunittest from './KvStoreBackupPromiseJsTest.js'
import schemaTest from './SchemaJsTest.js' import schemaTest from './SchemaJsTest.js'
import singleKvStoreEnumTest from './SingleKvStoreEnumJsTest.js' import singleKvStoreEnumTest from './SingleKvStoreEnumJsTest.js'
import kvStoreBackupPromiseJsunittest from './KvStoreBackupPromiseJsTest.js'
import kvStoreBackupCallbackJsunittest from './KvStoreBackupCallbackJsTest.js'
export default function testsuite() { export default function testsuite() {
SingleKvStorePromiseTest() SingleKvStorePromiseTest()
deviceKvStoreCallbackTest() deviceKvStoreCallbackTest()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册