提交 78127620 编写于 作者: W wangkun

fix test case bug.

Signed-off-by: Nwangkun <wangkun217@huawei.com>
上级 86690d06
...@@ -53,11 +53,10 @@ describe('KvStoreTest', function () { ...@@ -53,11 +53,10 @@ describe('KvStoreTest', function () {
it('testCreateKVManager102', 0, async function (done) { it('testCreateKVManager102', 0, async function (done) {
try { try {
await factory.createKVManager(null, function (err, manager) { await factory.createKVManager(null, function (err, manager) {
kvManager = manager; expect(null).assertFail();
expect(false).assertEqual(manager == null);
}); });
}catch (e) { }catch (e) {
expect(null).assertFail(); console.log("testCreateKVManager102 fail " + e);
} }
done(); done();
}) })
...@@ -65,11 +64,10 @@ describe('KvStoreTest', function () { ...@@ -65,11 +64,10 @@ describe('KvStoreTest', function () {
it('testCreateKVManager103', 0, async function (done) { it('testCreateKVManager103', 0, async function (done) {
try { try {
await factory.createKVManager('', function (err, manager) { await factory.createKVManager('', function (err, manager) {
kvManager = manager; expect(null).assertFail();
expect(false).assertEqual(manager == null);
}); });
}catch(e) { }catch(e) {
expect(null).assertFail(); console.log("testCreateKVManager103 fail " + e);
} }
done(); done();
}) })
...@@ -79,35 +77,36 @@ describe('KvStoreTest', function () { ...@@ -79,35 +77,36 @@ describe('KvStoreTest', function () {
await factory.createKVManager(config, function (err, manager) { await factory.createKVManager(config, function (err, manager) {
kvManager = manager; kvManager = manager;
expect(false).assertEqual(manager == null); expect(false).assertEqual(manager == null);
done();
}); });
}catch(e) { }catch(e) {
console.log("testCreateKVManager101 fail " + e);
expect(null).assertFail(); expect(null).assertFail();
} }
done();
}) })
it('testGetKVStore101', 0, async function (done) { it('testGetKVStore101', 0, async function (done) {
try { try {
await kvManager.getKVStore(options, function (err, store) { await kvManager.getKVStore(options, function (err, store) {
kvStore = store; expect(null).assertFail();
expect(false).assertEqual(store == null);
}); });
expect(null).assertFail();
}catch(e) { }catch(e) {
console.log("testGetKVStore101 fail " + e);
} }
done(); done();
}) })
it('testGetKVStore101', 0, async function (done) { it('testGetKVStore102', 0, async function (done) {
try { try {
await kvManager.getKVStore('storeId', options, function (err, store) { await kvManager.getKVStore('storeId', options, function (err, store) {
kvStore = store; kvStore = store;
expect(false).assertEqual(store == null); expect(false).assertEqual(store == null);
done();
}); });
}catch(e) { }catch(e) {
console.log("testGetKVStore102 fail " + e);
expect(null).assertFail(); expect(null).assertFail();
} }
done();
}) })
it('testPutString101', 0, async function (done) { it('testPutString101', 0, async function (done) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册