diff --git a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreCloudSyncEts.test.ets b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreCloudSyncEts.test.ets index 541b21912a38c7b6cf48d990574042506edf9b7a..56e4be51d0f31a1e873a97dc70fecd1b3b8fd895 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreCloudSyncEts.test.ets +++ b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreCloudSyncEts.test.ets @@ -245,9 +245,9 @@ export default function relationalStoreCloudSyncEtsTest(context) { it('testRdbStoreStatistic0010', 0, async function (done) { console.log(TAG + "************* testRdbStoreStatistic0010 start *************"); try { - let statistic1 : relationalStore.Statistic = {"total":10, "success":6, "failed":3, "remained":1}; + let statistic1 : relationalStore.Statistic = {"total":10, "successful":6, "failed":3, "remained":1}; expect(statistic1.total == 10 ).assertTrue(); - expect(statistic1.success == 6 ).assertTrue(); + expect(statistic1.successful == 6 ).assertTrue(); expect(statistic1.failed == 3 ).assertTrue(); expect(statistic1.remained == 1 ).assertTrue(); done(); @@ -267,8 +267,8 @@ export default function relationalStoreCloudSyncEtsTest(context) { it('testRdbStoreTableDetails0010', 0, async function (done) { console.log(TAG + "************* testRdbStoreTableDetails0010 start *************"); try { - let statistic1 : relationalStore.Statistic = {"total":10, "success":6, "failed":3, "remained":1}; - let statistic2 : relationalStore.Statistic = {"total":100, "success":60, "failed":30, "remained":10}; + let statistic1 : relationalStore.Statistic = {"total":10, "successful":6, "failed":3, "remained":1}; + let statistic2 : relationalStore.Statistic = {"total":100, "successful":60, "failed":30, "remained":10}; let tableDetail : relationalStore.TableDetails = {"upload": statistic1, "download": statistic2}; expect(tableDetail.upload == statistic1 ).assertTrue(); @@ -315,8 +315,8 @@ export default function relationalStoreCloudSyncEtsTest(context) { it('testRdbStoreProgressDetails0010', 0, async function (done) { console.log(TAG + "************* testRdbStoreProgressDetails0010 start *************"); try { - let statistic1 : relationalStore.Statistic = {"total":10, "success":6, "failed":3, "remained":1}; - let statistic2 : relationalStore.Statistic = {"total":100, "success":60, "failed":30, "remained":10}; + let statistic1 : relationalStore.Statistic = {"total":10, "successful":6, "failed":3, "remained":1}; + let statistic2 : relationalStore.Statistic = {"total":100, "successful":60, "failed":30, "remained":10}; let tableDetail : relationalStore.TableDetails = {"upload": statistic1, "download": statistic2}; let tableName = "cloud_text"; let progressDetail : relationalStore.ProgressDetails = {"schedule":2,"code":0,"details":{ [tableName]:tableDetail}}; diff --git a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreEmit.test.ets b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreEmit.test.ets index 5aaa5c2c2315e99365f0e5d28bfdc8bf3dc3e127..a0fe47ac624e912ce24a40892c3e00b21fdaf5fe 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreEmit.test.ets +++ b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreEmit.test.ets @@ -73,13 +73,15 @@ export default function relationalStoreEmitTest() { } try { - await rdbStore.on('storeObserverInsert', false, subscribeInsert); - await rdbStore.emit('storeObserverInsert'); + rdbStore.on('storeObserverInsert', false, subscribeInsert); + rdbStore.emit('storeObserverInsert'); await sleep(2000); let resultSet = await rdbStore.querySql("SELECT * FROM test"); console.info(TAG + "resultSet = " + resultSet.rowCount); expect(1).assertEqual(resultSet.rowCount); - + rdbStore.off('storeObserverInsert', false, subscribeInsert); + resultSet.close(); + resultSet = null; done(); } catch (err) { console.error(`failed, code is ${err.code},message is ${err.message}`);