diff --git a/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/Test.json b/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/Test.json index 2e559469188b2aebdd66345dbe88ad3729452897..11d07ca2a3e43b9013b914d5677bf90bf101a892 100644 --- a/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/Test.json +++ b/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/Test.json @@ -3,7 +3,6 @@ "driver": { "type": "OHJSUnitTest", "test-timeout": "1200000", - "testcase-timeout": 60000, "bundle-name": "ohos.acts.distributedKvStore", "package-name": "ohos.acts.distributedKvStore", "shell-timeout": "60000" diff --git a/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvStoreBackupCallbackJsTest.js b/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvStoreBackupCallbackJsTest.js index 1926ba7b8f7ddd9d34c7efe7e1c0de0003140fec..d58ac80fb0aad913a0dc3aad6436668e6c2c8bde 100644 --- a/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvStoreBackupCallbackJsTest.js +++ b/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvStoreBackupCallbackJsTest.js @@ -184,7 +184,6 @@ describe('kvStoreBackupCallbackJsunittest', function () { console.info('Test beforeAll: Prerequisites at the test suite level, ' + 'which are executed before t he test suite is executed.'); await publicgetKvStore(optionLock); - await sleep(5000); console.info("Test kvstore = " + kvStore) }) beforeEach( async function () { @@ -195,15 +194,14 @@ describe('kvStoreBackupCallbackJsunittest', function () { afterEach( async function () { console.info('afterEach: Test case-level clearance conditions, ' + 'which are executed after each test case is executed.'); - publicdeleteBackup(kvStore,files); - publiccloseKvStore(); + await publicdeleteBackup(kvStore,files); + await publiccloseKvStore(); files = [] - await sleep(5000); }) - afterAll(function () { + afterAll(async function () { console.info('afterAll: Test suite-level cleanup condition, ' + 'which is executed after the test suite is executed'); - publiccloseKvStore(); + await publiccloseKvStore(); kvManager = null; console.info("Test kvstore = " + kvStore) }) diff --git a/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvStoreBackupPromiseJsTest.js b/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvStoreBackupPromiseJsTest.js index a27b43441f5cf8c27a6ce1d3378b36232779fe4b..2ff960b208ecb7a9bd2314cafe4ad12186c6d14b 100644 --- a/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvStoreBackupPromiseJsTest.js +++ b/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/KvStoreBackupPromiseJsTest.js @@ -175,7 +175,6 @@ describe('kvStoreBackupPromiseJsunittest', function () { console.info('Test beforeAll: Prerequisites at the test suite level, ' + 'which are executed before the test suite is executed.'); await publicgetKvStore(optionLock); - await sleep(5000); console.info("Test kvstore = " + kvStore) }) beforeEach(function () { @@ -185,13 +184,12 @@ describe('kvStoreBackupPromiseJsunittest', function () { afterEach( async function () { console.info('afterEach: Test case-level clearance conditions, ' + 'which are executed after each test case is executed.'); - publicdeleteBackup(kvStore,files); - await sleep(5000); + await publicdeleteBackup(kvStore,files); }) afterAll( async function () { console.info('afterAll: Test suite-level cleanup condition, ' + 'which is executed after the test suite is executed'); - publiccloseKvStore(); + await publiccloseKvStore(); kvManager = null; console.info("Test kvstore = " + kvStore) })