diff --git a/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvManagerKVCallbackJsTest.js b/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvManagerKVCallbackJsTest.js index d8a2f307692af26c6afeb4e044e04a7c967a7689..6dbee2dd2d2c3d920e9e08cb2bd71bd7f723ff14 100644 --- a/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvManagerKVCallbackJsTest.js +++ b/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvManagerKVCallbackJsTest.js @@ -79,6 +79,7 @@ describe('kvManagerCallbackTest', function () { console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0100'); try { await kvManager.getKVStore(TEST_STORE_ID, options, function (err, store) { + expect((err == undefined) && (store != null)).assertTrue(); console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0100 getKVStore success'); kvStore = store; done(); @@ -104,6 +105,7 @@ describe('kvManagerCallbackTest', function () { console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0200 getKVStore success'); expect(null).assertFail(); } else { + expect((err != undefined)).assertTrue(); console.info('SUB_DDM_DKV_KVMANAGER_GETKVSTORE_0200 getKVStore fail'); } done(); diff --git a/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/KvManagerCallbackJsunit.test.js b/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/KvManagerCallbackJsunit.test.js index 20737c3cce73bbb8a69c1ea8d7b27c36b5a47d40..ac6f1ddb7518a330100bedff7b3409f5c52503fb 100644 --- a/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/KvManagerCallbackJsunit.test.js +++ b/distributeddatamgr/kvStoretest/kvStorejstest/hap/src/main/js/test/KvManagerCallbackJsunit.test.js @@ -82,6 +82,7 @@ describe('kvManagerCallbackTest', function () { console.info('testKVManagerGetKVStore101'); try { await kvManager.getKVStore(TEST_STORE_ID, options, function (err, store) { + expect((err == undefined) && (store != null)).assertTrue(); console.info('testKVManagerGetKVStore101 getKVStore success'); kvStore = store; done(); @@ -106,6 +107,7 @@ describe('kvManagerCallbackTest', function () { console.info('testKVManagerGetKVStore102 getKVStore success'); expect(null).assertFail(); } else { + expect((err != undefined)).assertTrue(); console.info('testKVManagerGetKVStore102 getKVStore fail'); } done();