提交 4601d0a3 编写于 作者: B bayanxing

分布式数据库用例修正

Signed-off-by: Nbayanxing <bayanxing@kaihongdigi.com>
上级 5e4739fb
...@@ -21,7 +21,6 @@ const STORE_KEY = 'key_test_string'; ...@@ -21,7 +21,6 @@ const STORE_KEY = 'key_test_string';
const STORE_VALUE = 'value-test-string'; const STORE_VALUE = 'value-test-string';
var kvManager = null; var kvManager = null;
var kvStore = null; var kvStore = null;
var kvStoreNew = null;
describe('KVManagerCallbackTest', function () { describe('KVManagerCallbackTest', function () {
const config = { const config = {
...@@ -46,11 +45,8 @@ describe('KVManagerCallbackTest', function () { ...@@ -46,11 +45,8 @@ describe('KVManagerCallbackTest', function () {
console.log('beforeAll'); console.log('beforeAll');
await factory.createKVManager(config, function (err, manager) { await factory.createKVManager(config, function (err, manager) {
kvManager = manager; kvManager = manager;
kvManager.getKVStore(TEST_STORE_ID, options, function (err, store) {
kvStoreNew = store;
done(); done();
}); });
});
console.log('beforeAll end'); console.log('beforeAll end');
}) })
...@@ -442,9 +438,10 @@ describe('KVManagerCallbackTest', function () { ...@@ -442,9 +438,10 @@ describe('KVManagerCallbackTest', function () {
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) { await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) {
if (err == undefined) { if (err == undefined) {
console.log('testKVManagerGetKVStore113 getKVStore success'); console.log('testKVManagerGetKVStore113 getKVStore success');
expect(null).assertFail(); expect((err == undefined) && (store != null)).assertTrue();
} else { } else {
console.log('testKVManagerGetKVStore113 getKVStore fail'); console.log('testKVManagerGetKVStore113 getKVStore fail');
expect(null).assertFail();
} }
done(); done();
}); });
...@@ -483,7 +480,7 @@ describe('KVManagerCallbackTest', function () { ...@@ -483,7 +480,7 @@ describe('KVManagerCallbackTest', function () {
done(); done();
} }
}) })
F
/** /**
* @tc.number SUB_DISTRIBUTEDDATAMGR_KVMANAGER_GETKVSTORE_1150 * @tc.number SUB_DISTRIBUTEDDATAMGR_KVMANAGER_GETKVSTORE_1150
* @tc.name [JS-API8]KVManager.GetKVStore. * @tc.name [JS-API8]KVManager.GetKVStore.
...@@ -503,13 +500,12 @@ describe('KVManagerCallbackTest', function () { ...@@ -503,13 +500,12 @@ describe('KVManagerCallbackTest', function () {
try { try {
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) { await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) {
console.log('testKVManagerGetKVStore115 getKVStore success'); console.log('testKVManagerGetKVStore115 getKVStore success');
expect((err == undefined) && (store != null)).assertTrue(); expect(null).assertFail();
kvStore = store;
done(); done();
}); });
} catch (e) { } catch (e) {
console.log('testKVManagerGetKVStore115 getKVStore e ' + e); console.log('testKVManagerGetKVStore115 getKVStore e ' + e);
expect(null).assertFail(); expect(true).assertTrue();
done(); done();
} }
}) })
...@@ -533,13 +529,12 @@ describe('KVManagerCallbackTest', function () { ...@@ -533,13 +529,12 @@ describe('KVManagerCallbackTest', function () {
try { try {
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) { await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) {
console.log('testKVManagerGetKVStore116 getKVStore success'); console.log('testKVManagerGetKVStore116 getKVStore success');
expect((err == undefined) && (store != null)).assertTrue(); expect(null).assertFail();
kvStore = store;
done(); done();
}); });
} catch (e) { } catch (e) {
console.log('testKVManagerGetKVStore116 getKVStore e ' + e); console.log('testKVManagerGetKVStore116 getKVStore e ' + e);
expect(null).assertFail(); expect(true).assertTrue();
done(); done();
} }
}) })
...@@ -563,13 +558,12 @@ describe('KVManagerCallbackTest', function () { ...@@ -563,13 +558,12 @@ describe('KVManagerCallbackTest', function () {
try { try {
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) { await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) {
console.log('testKVManagerGetKVStore117 getKVStore success'); console.log('testKVManagerGetKVStore117 getKVStore success');
expect((err == undefined) && (store != null)).assertTrue(); expect(null).assertFail();
kvStore = store;
done(); done();
}); });
} catch (e) { } catch (e) {
console.log('testKVManagerGetKVStore117 getKVStore e ' + e); console.log('testKVManagerGetKVStore117 getKVStore e ' + e);
expect(null).assertFail(); expect(true).assertTrue();
done(); done();
} }
}) })
...@@ -593,13 +587,12 @@ describe('KVManagerCallbackTest', function () { ...@@ -593,13 +587,12 @@ describe('KVManagerCallbackTest', function () {
try { try {
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) { await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) {
console.log('testKVManagerGetKVStore118 getKVStore success'); console.log('testKVManagerGetKVStore118 getKVStore success');
expect((err == undefined) && (store != null)).assertTrue(); expect(null).assertFail();
kvStore = store;
done(); done();
}); });
} catch (e) { } catch (e) {
console.log('testKVManagerGetKVStore118 getKVStore e ' + e); console.log('testKVManagerGetKVStore118 getKVStore e ' + e);
expect(null).assertFail(); expect(true).assertTrue();
done(); done();
} }
}) })
...@@ -623,13 +616,12 @@ describe('KVManagerCallbackTest', function () { ...@@ -623,13 +616,12 @@ describe('KVManagerCallbackTest', function () {
try { try {
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) { await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) {
console.log('testKVManagerGetKVStore119 getKVStore success'); console.log('testKVManagerGetKVStore119 getKVStore success');
expect((err == undefined) && (store != null)).assertTrue(); expect(null).assertFail();
kvStore = store;
done(); done();
}); });
} catch (e) { } catch (e) {
console.log('testKVManagerGetKVStore119 getKVStore e ' + e); console.log('testKVManagerGetKVStore119 getKVStore e ' + e);
expect(null).assertFail(); expect(true).assertTrue();
done(); done();
} }
}) })
...@@ -653,13 +645,12 @@ describe('KVManagerCallbackTest', function () { ...@@ -653,13 +645,12 @@ describe('KVManagerCallbackTest', function () {
try { try {
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) { await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) {
console.log('testKVManagerGetKVStore120 getKVStore success'); console.log('testKVManagerGetKVStore120 getKVStore success');
expect((err == undefined) && (store != null)).assertTrue(); expect(null).assertFail();
kvStore = store;
done(); done();
}); });
} catch (e) { } catch (e) {
console.log('testKVManagerGetKVStore119 getKVStore e ' + e); console.log('testKVManagerGetKVStore119 getKVStore e ' + e);
expect(null).assertFail(); expect(true).assertTrue();
done(); done();
} }
}) })
...@@ -923,7 +914,10 @@ describe('KVManagerCallbackTest', function () { ...@@ -923,7 +914,10 @@ describe('KVManagerCallbackTest', function () {
it('testKVStorePut100', 0, async function (done) { it('testKVStorePut100', 0, async function (done) {
console.log('testKVStorePut100'); console.log('testKVStorePut100');
try { try {
await kvStoreNew.put(STORE_KEY, STORE_VALUE, function (err, data) { await kvManager.getKVStore(TEST_STORE_ID, options, async function (err, store) {
console.log('testKVStorePut100 getKVStore success');
kvStore = store;
await kvStore.put(STORE_KEY, STORE_VALUE, function (err, data) {
if (err != undefined){ if (err != undefined){
console.log('testKVStorePut100 put callback fail'); console.log('testKVStorePut100 put callback fail');
} else { } else {
...@@ -932,91 +926,22 @@ describe('KVManagerCallbackTest', function () { ...@@ -932,91 +926,22 @@ describe('KVManagerCallbackTest', function () {
} }
done(); done();
}); });
} catch (e) {
console.log('testKVStorePut100 callback e ' + e);
done();
}
})
/**
* @tc.number SUB_DISTRIBUTEDDATAMGR_KVSTORE_DELETE_1000
* @tc.name [JS-API8]KVStore.Delete
* @tc.desc Test Js Api KVManager.Delete testcase 100
*/
it('testKVStoreDelete100', 0, async function (done) {
console.log('testKVStoreDelete100');
try {
await KVStoreNew.put(STORE_KEY, STORE_VALUE, async function (err,data) {
console.log('testKVStoreDelete100 put success');
try {
kvStore.delete(STORE_KEY, function (err, data) {
if (err == undefined) {
console.log('testKVStoreDelete100 callback delete success');
expect(null).assertFail();
} else {
console.log('testKVStoreDelete100 callback delete fail');
}
done();
}); });
} catch (e) { } catch (e) {
console.log('testKVStoreDelete100 callback delete e ' + e); console.log('testKVStorePut100 callback e ' + e);
done();
}
});
} catch (ee) {
console.log('testKVStoreDelete100 callback delete ee ' + ee);
expect(null).assertFail();
done(); done();
} }
}) })
/**
* @tc.number SUB_DISTRIBUTEDDATAMGR_KVSTORE_ON_1000
* @tc.name [JS-API8]KVStore.On
* @tc.desc Test Js Api KVManager.On testcase 100
*/
it('testKVStoreOn100', 0, async function (done) {
kvStoreNew.on('dataChange', 0, function (data) {
console.log("testKVStoreOn100 callback call data: " + JSON.stringify(data));
expect(true).assertTrue();
});
done();
})
/** /**
* @tc.number SUB_DISTRIBUTEDDATAMGR_KVSTORE_ON_1100 * @tc.number SUB_DISTRIBUTEDDATAMGR_KVSTORE_ON_1100
* @tc.name [JS-API8]KVStore.On * @tc.name [JS-API8]KVStore.On
* @tc.desc Test Js Api KVManager.On testcase 101 * @tc.desc Test Js Api KVManager.On testcase 101
*/ */
it('testKVStoreOn101', 0, async function (done) { it('testKVStoreOn101', 0, async function (done) {
kvStoreNew.on('dataChange', 1, function (data) {
console.log("testKVStoreOn101 callback call data: " + JSON.stringify(data));
expect(true).assertTrue();
});
done();
})
/**
* @tc.number SUB_DISTRIBUTEDDATAMGR_KVSTORE_ON_1200
* @tc.name [JS-API8]KVStore.On
* @tc.desc Test Js Api KVManager.On testcase 102
*/
it('testKVStoreOn102', 0, async function (done) {
kvStoreNew.on('dataChange', 2, function (data) {
console.log("testKVStoreOn102 callback call data: " + JSON.stringify(data));
expect(true).assertTrue();
});
done();
})
/**
* @tc.number SUB_DISTRIBUTEDDATAMGR_KVSTORE_ON_1300
* @tc.name [JS-API8]KVStore.On
* @tc.desc Test Js Api KVManager.On testcase 103
*/
it('testKVStoreOn103', 0, async function (done) {
kvStoreNew.on('syncComplete', function (data) { kvStoreNew.on('syncComplete', function (data) {
console.log("testKVStoreOn103 callback call data: " + data); console.log("testKVStoreOn101 callback call data: " + data);
expect(true).assertTrue(); expect(true).assertTrue();
}); });
done(); done();
......
...@@ -441,11 +441,10 @@ describe('KVManagerPromiseTest', function () { ...@@ -441,11 +441,10 @@ describe('KVManagerPromiseTest', function () {
} }
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo).then((store) => { await kvManager.getKVStore(TEST_STORE_ID, optionsInfo).then((store) => {
console.log('testKVManagerGetKVStore014 getKVStore success'); console.log('testKVManagerGetKVStore014 getKVStore success');
kvStore = store; expect(null).assertFail();
expect(store != null).assertTrue();
}).catch((err) => { }).catch((err) => {
console.log('testKVManagerGetKVStore014 getKVStore err ' + err); console.log('testKVManagerGetKVStore014 getKVStore err ' + err);
expect(null).assertFail(); expect(true).assertTrue();
}); });
done(); done();
}) })
...@@ -468,11 +467,10 @@ describe('KVManagerPromiseTest', function () { ...@@ -468,11 +467,10 @@ describe('KVManagerPromiseTest', function () {
} }
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo).then((store) => { await kvManager.getKVStore(TEST_STORE_ID, optionsInfo).then((store) => {
console.log('testKVManagerGetKVStore015 getKVStore success'); console.log('testKVManagerGetKVStore015 getKVStore success');
kvStore = store; expect(null).assertFail();
expect(store != null).assertTrue();
}).catch((err) => { }).catch((err) => {
console.log('testKVManagerGetKVStore015 getKVStore err ' + err); console.log('testKVManagerGetKVStore015 getKVStore err ' + err);
expect(null).assertFail(); expect(true).assertTrue();
}); });
done(); done();
}) })
...@@ -495,11 +493,10 @@ describe('KVManagerPromiseTest', function () { ...@@ -495,11 +493,10 @@ describe('KVManagerPromiseTest', function () {
} }
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo).then((store) => { await kvManager.getKVStore(TEST_STORE_ID, optionsInfo).then((store) => {
console.log('testKVManagerGetKVStore016 getKVStore success'); console.log('testKVManagerGetKVStore016 getKVStore success');
kvStore = store; expect(null).assertFail();
expect(store != null).assertTrue();
}).catch((err) => { }).catch((err) => {
console.log('testKVManagerGetKVStore016 getKVStore err ' + err); console.log('testKVManagerGetKVStore016 getKVStore err ' + err);
expect(null).assertFail(); expect(true).assertTrue();
}); });
done(); done();
}) })
...@@ -522,11 +519,10 @@ describe('KVManagerPromiseTest', function () { ...@@ -522,11 +519,10 @@ describe('KVManagerPromiseTest', function () {
} }
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo).then((store) => { await kvManager.getKVStore(TEST_STORE_ID, optionsInfo).then((store) => {
console.log('testKVManagerGetKVStore017 getKVStore success'); console.log('testKVManagerGetKVStore017 getKVStore success');
kvStore = store; expect(null).assertFail();
expect(store != null).assertTrue();
}).catch((err) => { }).catch((err) => {
console.log('testKVManagerGetKVStore017 getKVStore err ' + err); console.log('testKVManagerGetKVStore017 getKVStore err ' + err);
expect(null).assertFail(); expect(true).assertTrue();
}); });
done(); done();
}) })
...@@ -549,11 +545,10 @@ describe('KVManagerPromiseTest', function () { ...@@ -549,11 +545,10 @@ describe('KVManagerPromiseTest', function () {
} }
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo).then((store) => { await kvManager.getKVStore(TEST_STORE_ID, optionsInfo).then((store) => {
console.log('testKVManagerGetKVStore018 getKVStore success'); console.log('testKVManagerGetKVStore018 getKVStore success');
kvStore = store; expect(null).assertFail();
expect(store != null).assertTrue();
}).catch((err) => { }).catch((err) => {
console.log('testKVManagerGetKVStore018 getKVStore err ' + err); console.log('testKVManagerGetKVStore018 getKVStore err ' + err);
expect(null).assertFail(); expect(true).assertTrue();
}); });
done(); done();
}) })
...@@ -576,11 +571,10 @@ describe('KVManagerPromiseTest', function () { ...@@ -576,11 +571,10 @@ describe('KVManagerPromiseTest', function () {
} }
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo).then((store) => { await kvManager.getKVStore(TEST_STORE_ID, optionsInfo).then((store) => {
console.log('testKVManagerGetKVStore019 getKVStore success'); console.log('testKVManagerGetKVStore019 getKVStore success');
kvStore = store; expect(null).assertFail();
expect(store != null).assertTrue();
}).catch((err) => { }).catch((err) => {
console.log('testKVManagerGetKVStore019 getKVStore err ' + err); console.log('testKVManagerGetKVStore019 getKVStore err ' + err);
expect(null).assertFail(); expect(true).assertTrue();
}); });
done(); done();
}) })
...@@ -591,95 +585,18 @@ describe('KVManagerPromiseTest', function () { ...@@ -591,95 +585,18 @@ describe('KVManagerPromiseTest', function () {
* @tc.desc Test Js Api KVManager.CloseKVStore testcase 001 * @tc.desc Test Js Api KVManager.CloseKVStore testcase 001
*/ */
it('testKVManagerCloseKVStore001', 0, async function (done) { it('testKVManagerCloseKVStore001', 0, async function (done) {
console.log('testKVManagerCloseKVStore001');
await kvManager.getKVStore(TEST_STORE_ID, options).then(async (store) => {
console.log('testKVManagerCloseKVStore001 getKVStore success');
kvStore = store;
await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore).then(() => {
console.log('testKVManagerCloseKVStore001 closeKVStore success');
}).catch((err) => {
console.log('testKVManagerCloseKVStore001 closeKVStore err ' + err);
expect(null).assertFail();
});
}).catch((err) => {
console.log('testKVManagerCloseKVStore001 getKVStore err ' + err);
expect(null).assertFail();
});
done();
})
/**
* @tc.number SUB_DISTRIBUTEDDATAMGR_KVMANAGER_CLOSEKVSTORE_0200
* @tc.name [JS-API8]KVManager.CloseKVStore.
* @tc.desc Test Js Api KVManager.CloseKVStore testcase 002
*/
it('testKVManagerCloseKVStore002', 0, async function (done) {
console.log('testKVManagerCloseKVStore002');
await kvManager.getKVStore(TEST_STORE_ID, options).then(async (store) => {
console.log('testKVManagerCloseKVStore002 getKVStore success');
kvStore = store;
try {
await kvManager.closeKVStore(TEST_BUNDLE_NAME).then(() => {
console.log('testKVManagerCloseKVStore002 closeKVStore success');
expect(null).assertFail();
}).catch((err) => {
console.log('testKVManagerCloseKVStore002 closeKVStore err ' + err);
});
} catch (e) {
console.log('testKVManagerCloseKVStore002 closeKVStore e ' + e);
}
}).catch((err) => {
console.log('testKVManagerCloseKVStore002 getKVStore err ' + err);
expect(null).assertFail();
});
done();
})
/**
* @tc.number SUB_DISTRIBUTEDDATAMGR_KVMANAGER_CLOSEKVSTORE_0300
* @tc.name [JS-API8]KVManager.CloseKVStore.
* @tc.desc Test Js Api KVManager.CloseKVStore testcase 003
*/
it('testKVManagerCloseKVStore003', 0, async function (done) {
console.log('testKVManagerCloseKVStore003');
await kvManager.getKVStore(TEST_STORE_ID, options).then(async (store) => {
console.log('testKVManagerCloseKVStore003 getKVStore success');
kvStore = store;
try {
await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID).then(() => {
console.log('testKVManagerCloseKVStore003 closeKVStore success');
expect(null).assertFail();
}).catch((err) => {
console.log('testKVManagerCloseKVStore003 closeKVStore err ' + err);
});
} catch (e) {
console.log('testKVManagerCloseKVStore003 closeKVStore e ' + e);
}
}).catch((err) => {
console.log('testKVManagerCloseKVStore003 getKVStore err ' + err);
expect(null).assertFail();
});
done();
})
/**
* @tc.number SUB_DISTRIBUTEDDATAMGR_KVMANAGER_CLOSEKVSTORE_0400
* @tc.name [JS-API8]KVManager.CloseKVStore.
* @tc.desc Test Js Api KVManager.CloseKVStore testcase 004
*/
it('testKVManagerCloseKVStore004', 0, async function (done) {
console.log('testKVManagerCloseKVStore004'); console.log('testKVManagerCloseKVStore004');
await kvManager.getKVStore(TEST_STORE_ID, options, async function (err, store) { await kvManager.getKVStore(TEST_STORE_ID, options, async function (err, store) {
console.log('testKVManagerCloseKVStore004 getKVStore success'); console.log('testKVManagerCloseKVStore001 getKVStore success');
kvStore = store; kvStore = store;
await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore); await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore);
}); });
console.log('testKVManagerCloseKVStore104 closeKVStore redo.'); console.log('testKVManagerCloseKVStore001 closeKVStore redo.');
await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore).then(() => { await kvManager.closeKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID, kvStore).then(() => {
console.log('testKVManagerCloseKVStore004 closeKVStore twice'); console.log('testKVManagerCloseKVStore001 closeKVStore twice');
expect(null).assertFail(); expect(null).assertFail();
}).catch((err) => { }).catch((err) => {
console.log('testKVManagerCloseKVStore004 closeKVStore twice err ' + err); console.log('testKVManagerCloseKVStore001 closeKVStore twice err ' + err);
}); });
done(); done();
}) })
...@@ -691,61 +608,11 @@ describe('KVManagerPromiseTest', function () { ...@@ -691,61 +608,11 @@ describe('KVManagerPromiseTest', function () {
*/ */
it('testKVManagerDeleteKVStore001', 0, async function (done) { it('testKVManagerDeleteKVStore001', 0, async function (done) {
console.log('testKVManagerDeleteKVStore001'); console.log('testKVManagerDeleteKVStore001');
await kvManager.getKVStore(TEST_STORE_ID, options).then(async (store) => {
console.log('testKVManagerDeleteKVStore001 getKVStore success');
kvStore = store;
await kvManager.deleteKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID).then(() => { await kvManager.deleteKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID).then(() => {
console.log('testKVManagerDeleteKVStore001 deleteKVStore success'); console.log('testKVManagerDeleteKVStore001 deleteKVStore success');
}).catch((err) => {
console.log('testKVManagerDeleteKVStore001 deleteKVStore err ' + err);
expect(null).assertFail();
});
}).catch((err) => {
console.log('testKVManagerDeleteKVStore001 getKVStore err ' + err);
expect(null).assertFail();
});
done();
})
/**
* @tc.number SUB_DISTRIBUTEDDATAMGR_KVMANAGER_DELETEKVSTORE_0200
* @tc.name [JS-API8]KVManager.DeleteKVStore.
* @tc.desc Test Js Api KVManager.DeleteKVStore testcase 002
*/
it('testKVManagerDeleteKVStore002', 0, async function (done) {
console.log('testKVManagerDeleteKVStore002');
await kvManager.getKVStore(TEST_STORE_ID, options).then(async (store) => {
console.log('testKVManagerDeleteKVStore002 getKVStore success');
kvStore = store;
try {
await kvManager.deleteKVStore(TEST_BUNDLE_NAME).then(() => {
console.log('testKVManagerDeleteKVStore002 deleteKVStore success');
expect(null).assertFail(); expect(null).assertFail();
}).catch((err) => { }).catch((err) => {
console.log('testKVManagerDeleteKVStore002 deleteKVStore err ' + err); console.log('testKVManagerDeleteKVStore001 deleteKVStore err ' + err);
});
} catch (e) {
console.log('testKVManagerDeleteKVStore002 deleteKVStore e ' + e);
}
}).catch((err) => {
console.log('testKVManagerDeleteKVStore002 getKVStore err ' + err);
expect(null).assertFail();
});
done();
})
/**
* @tc.number SUB_DISTRIBUTEDDATAMGR_KVMANAGER_DELETEKVSTORE_0300
* @tc.name [JS-API8]KVManager.DeleteKVStore.
* @tc.desc Test Js Api KVManager.DeleteKVStore testcase 003
*/
it('testKVManagerDeleteKVStore003', 0, async function (done) {
console.log('testKVManagerDeleteKVStore003');
await kvManager.deleteKVStore(TEST_BUNDLE_NAME, TEST_STORE_ID).then(() => {
console.log('testKVManagerDeleteKVStore003 deleteKVStore success');
expect(null).assertFail();
}).catch((err) => {
console.log('testKVManagerDeleteKVStore003 deleteKVStore err ' + err);
}); });
done(); done();
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册