提交 d1dfcf42 编写于 作者: B bayanxing

分布式数据库用例修正

Signed-off-by: Nbayanxing <bayanxing@kaihongdigi.com>
上级 678719f8
...@@ -500,12 +500,12 @@ describe('KVManagerCallbackTest', function () { ...@@ -500,12 +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(null).assertFail(); expect(true).assertTrue();
done(); done();
}); });
} catch (e) { } catch (e) {
console.log('testKVManagerGetKVStore115 getKVStore e ' + e); console.log('testKVManagerGetKVStore115 getKVStore e ' + e);
expect(true).assertTrue(); expect(null).assertFail();
done(); done();
} }
}) })
...@@ -529,12 +529,12 @@ describe('KVManagerCallbackTest', function () { ...@@ -529,12 +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(null).assertFail(); expect(true).assertTrue();
done(); done();
}); });
} catch (e) { } catch (e) {
console.log('testKVManagerGetKVStore116 getKVStore e ' + e); console.log('testKVManagerGetKVStore116 getKVStore e ' + e);
expect(true).assertTrue(); expect(null).assertFail();
done(); done();
} }
}) })
...@@ -558,12 +558,12 @@ describe('KVManagerCallbackTest', function () { ...@@ -558,12 +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(null).assertFail(); expect(true).assertTrue();
done(); done();
}); });
} catch (e) { } catch (e) {
console.log('testKVManagerGetKVStore117 getKVStore e ' + e); console.log('testKVManagerGetKVStore117 getKVStore e ' + e);
expect(true).assertTrue(); expect(null).assertFail();
done(); done();
} }
}) })
...@@ -587,12 +587,12 @@ describe('KVManagerCallbackTest', function () { ...@@ -587,12 +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(null).assertFail(); expect(true).assertTrue();
done(); done();
}); });
} catch (e) { } catch (e) {
console.log('testKVManagerGetKVStore118 getKVStore e ' + e); console.log('testKVManagerGetKVStore118 getKVStore e ' + e);
expect(true).assertTrue(); expect(null).assertFail();
done(); done();
} }
}) })
...@@ -616,12 +616,12 @@ describe('KVManagerCallbackTest', function () { ...@@ -616,12 +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(null).assertFail(); expect(true).assertTrue();
done(); done();
}); });
} catch (e) { } catch (e) {
console.log('testKVManagerGetKVStore119 getKVStore e ' + e); console.log('testKVManagerGetKVStore119 getKVStore e ' + e);
expect(true).assertTrue(); expect(null).assertFail();
done(); done();
} }
}) })
...@@ -645,12 +645,12 @@ describe('KVManagerCallbackTest', function () { ...@@ -645,12 +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(null).assertFail(); expect(true).assertTrue();
done(); done();
}); });
} catch (e) { } catch (e) {
console.log('testKVManagerGetKVStore119 getKVStore e ' + e); console.log('testKVManagerGetKVStore119 getKVStore e ' + e);
expect(true).assertTrue(); expect(null).assertFail();
done(); done();
} }
}) })
...@@ -920,9 +920,10 @@ describe('KVManagerCallbackTest', function () { ...@@ -920,9 +920,10 @@ describe('KVManagerCallbackTest', function () {
await kvStore.put(STORE_KEY, STORE_VALUE, function (err, data) { 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');
expect(null).assertFail();
} else { } else {
console.log('testKVStorePut100 put callback success'); console.log('testKVStorePut100 put callback success');
expect(null).assertFail(); expect(true).assertTrue();
} }
done(); done();
}); });
...@@ -930,6 +931,7 @@ describe('KVManagerCallbackTest', function () { ...@@ -930,6 +931,7 @@ describe('KVManagerCallbackTest', function () {
} catch (e) { } catch (e) {
console.log('testKVStorePut100 callback e ' + e); console.log('testKVStorePut100 callback e ' + e);
expect(null).assertFail();
done(); done();
} }
}) })
...@@ -939,11 +941,11 @@ describe('KVManagerCallbackTest', function () { ...@@ -939,11 +941,11 @@ describe('KVManagerCallbackTest', function () {
* @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('syncComplete', function (data) { // kvStoreNew.on('syncComplete', function (data) {
console.log("testKVStoreOn101 callback call data: " + data); // console.log("testKVStoreOn101 callback call data: " + data);
expect(true).assertTrue(); // expect(true).assertTrue();
}); // });
done(); // done();
}) // })
}) })
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册