提交 d1dfcf42 编写于 作者: B bayanxing

分布式数据库用例修正

Signed-off-by: Nbayanxing <bayanxing@kaihongdigi.com>
上级 678719f8
......@@ -500,12 +500,12 @@ describe('KVManagerCallbackTest', function () {
try {
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) {
console.log('testKVManagerGetKVStore115 getKVStore success');
expect(null).assertFail();
expect(true).assertTrue();
done();
});
} catch (e) {
console.log('testKVManagerGetKVStore115 getKVStore e ' + e);
expect(true).assertTrue();
expect(null).assertFail();
done();
}
})
......@@ -529,12 +529,12 @@ describe('KVManagerCallbackTest', function () {
try {
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) {
console.log('testKVManagerGetKVStore116 getKVStore success');
expect(null).assertFail();
expect(true).assertTrue();
done();
});
} catch (e) {
console.log('testKVManagerGetKVStore116 getKVStore e ' + e);
expect(true).assertTrue();
expect(null).assertFail();
done();
}
})
......@@ -558,12 +558,12 @@ describe('KVManagerCallbackTest', function () {
try {
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) {
console.log('testKVManagerGetKVStore117 getKVStore success');
expect(null).assertFail();
expect(true).assertTrue();
done();
});
} catch (e) {
console.log('testKVManagerGetKVStore117 getKVStore e ' + e);
expect(true).assertTrue();
expect(null).assertFail();
done();
}
})
......@@ -587,12 +587,12 @@ describe('KVManagerCallbackTest', function () {
try {
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) {
console.log('testKVManagerGetKVStore118 getKVStore success');
expect(null).assertFail();
expect(true).assertTrue();
done();
});
} catch (e) {
console.log('testKVManagerGetKVStore118 getKVStore e ' + e);
expect(true).assertTrue();
expect(null).assertFail();
done();
}
})
......@@ -616,12 +616,12 @@ describe('KVManagerCallbackTest', function () {
try {
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) {
console.log('testKVManagerGetKVStore119 getKVStore success');
expect(null).assertFail();
expect(true).assertTrue();
done();
});
} catch (e) {
console.log('testKVManagerGetKVStore119 getKVStore e ' + e);
expect(true).assertTrue();
expect(null).assertFail();
done();
}
})
......@@ -645,12 +645,12 @@ describe('KVManagerCallbackTest', function () {
try {
await kvManager.getKVStore(TEST_STORE_ID, optionsInfo, function (err, store) {
console.log('testKVManagerGetKVStore120 getKVStore success');
expect(null).assertFail();
expect(true).assertTrue();
done();
});
} catch (e) {
console.log('testKVManagerGetKVStore119 getKVStore e ' + e);
expect(true).assertTrue();
expect(null).assertFail();
done();
}
})
......@@ -920,9 +920,10 @@ describe('KVManagerCallbackTest', function () {
await kvStore.put(STORE_KEY, STORE_VALUE, function (err, data) {
if (err != undefined){
console.log('testKVStorePut100 put callback fail');
expect(null).assertFail();
} else {
console.log('testKVStorePut100 put callback success');
expect(null).assertFail();
expect(true).assertTrue();
}
done();
});
......@@ -930,6 +931,7 @@ describe('KVManagerCallbackTest', function () {
} catch (e) {
console.log('testKVStorePut100 callback e ' + e);
expect(null).assertFail();
done();
}
})
......@@ -939,11 +941,11 @@ describe('KVManagerCallbackTest', function () {
* @tc.name [JS-API8]KVStore.On
* @tc.desc Test Js Api KVManager.On testcase 101
*/
it('testKVStoreOn101', 0, async function (done) {
kvStoreNew.on('syncComplete', function (data) {
console.log("testKVStoreOn101 callback call data: " + data);
expect(true).assertTrue();
});
done();
})
// it('testKVStoreOn101', 0, async function (done) {
// kvStoreNew.on('syncComplete', function (data) {
// console.log("testKVStoreOn101 callback call data: " + data);
// expect(true).assertTrue();
// });
// done();
// })
})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册