From df947c10c54e3b41f17a71f18e1ab1007f6218d5 Mon Sep 17 00:00:00 2001 From: yanglifeng1217 Date: Fri, 30 Dec 2022 16:20:14 +0800 Subject: [PATCH] Signed-off-by: yanglifeng1217 --- ...alStoreBackupRestoreCallbackJsunit.test.js | 2 +- ...reBackupRestoreWithFAContextJsunit.test.js | 2 +- .../test/RelationalStoreDeleteJsunit.test.js | 2 +- .../RelationalStoreDistributedJsunit.test.js | 4 ++-- .../RelationalStoreEncryptionJsunit.test.js | 6 +++--- .../RelationalStoreExcuteSqlJsunit.test.js | 2 +- .../test/RelationalStoreInsertJsunit.test.js | 2 +- .../js/test/RelationalStoreJsunit.test.js | 18 ++++++++--------- ...lStorePredicatesComplexFiledJsunit.test.js | 2 +- ...elationalStorePredicatesJoinJsunit.test.js | 2 +- .../RelationalStorePredicatesJsunit.test.js | 2 +- .../main/js/test/RelationalStoreQuery.test.js | 2 +- .../RelationalStoreResultSetJsunit.test.js | 2 +- .../RelationalStoreTransactionJsunit.test.js | 2 +- .../test/RelationalStoreUpdateJsunit.test.js | 2 +- ...relationalStoreDistributedEtsunit.test.ets | 2 +- .../ets/test/relationalStoreEtsunit.test.ets | 20 +++++++++---------- ...lationalStoreTestResultsetEtsunit.test.ets | 2 +- 18 files changed, 38 insertions(+), 38 deletions(-) diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreBackupRestoreCallbackJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreBackupRestoreCallbackJsunit.test.js index 95e38a5cf..86afb34c0 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreBackupRestoreCallbackJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreBackupRestoreCallbackJsunit.test.js @@ -30,7 +30,7 @@ const STORE_CONFIG = { const DATABASE_BACKUP_NAME = "Backup.db" async function CreatRdbStore(context, STORE_CONFIG) { - let RdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG, 1) + let RdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG) await RdbStore.executeSql(CREATE_TABLE_TEST, null) let u8 = new Uint8Array([1, 2, 3]) { diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreBackupRestoreWithFAContextJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreBackupRestoreWithFAContextJsunit.test.js index 59192d89f..9a6ff85db 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreBackupRestoreWithFAContextJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreBackupRestoreWithFAContextJsunit.test.js @@ -30,7 +30,7 @@ const STORE_CONFIG = { const DATABASE_BACKUP_NAME = "Backup.db" async function CreatRdbStore(context, STORE_CONFIG) { - let RdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG, 1) + let RdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG) await RdbStore.executeSql(CREATE_TABLE_TEST, null) let u8 = new Uint8Array([1, 2, 3]) { diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreDeleteJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreDeleteJsunit.test.js index 0369f604f..a07a4e51d 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreDeleteJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreDeleteJsunit.test.js @@ -34,7 +34,7 @@ describe('relationalStoreDeleteTest', function () { beforeEach(async function () { console.info(TAG + 'beforeEach') - rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG, 1); + rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG); await rdbStore.executeSql(CREATE_TABLE_TEST, null); }) diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreDistributedJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreDistributedJsunit.test.js index 004b59da8..e8dd3a7d3 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreDistributedJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreDistributedJsunit.test.js @@ -67,7 +67,7 @@ export default function relationalStoreDistributedTest() { describe('relationalStoreDistributedTest', function () { beforeAll(async function () { console.info(TAG + 'beforeAll') - rdbStore = await data_Rdb.getRdbStore(context, config, 1); + rdbStore = await data_Rdb.getRdbStore(context, config); console.info(TAG + "create RelationalStore store success") await executeSql1() await executeSql2() @@ -399,7 +399,7 @@ describe('relationalStoreDistributedTest', function () { "name": STORE_NAME, securityLevel: data_Rdb.SecurityLevel.S1 } - rdbStore = await data_Rdb.getRdbStore(context, config, 1); + rdbStore = await data_Rdb.getRdbStore(context, config); let errInfo = undefined try{ rdbStore.obtainDistributedTableName(["deviceId"], "EMPLOYEE") diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreEncryptionJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreEncryptionJsunit.test.js index 8efbbfc91..1777b0ad3 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreEncryptionJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreEncryptionJsunit.test.js @@ -41,7 +41,7 @@ const STORE_CONFIG_WRONG = { export default function relationalStoreEncryptTest() { async function CreatRdbStore(context, STORE_CONFIG) { - let rdbStore = await data_rdb.getRdbStore(context, STORE_CONFIG, 1) + let rdbStore = await data_rdb.getRdbStore(context, STORE_CONFIG) await rdbStore.executeSql(CREATE_TABLE_TEST, null) let u8 = new Uint8Array([1, 2, 3]) { @@ -107,7 +107,7 @@ describe('relationalStoreEncryptTest', function () { it('RdbEncryptTest_0010', 0, async function (done) { console.info(TAG + "************* RdbEncryptTest_0010 start *************") context = ability_featureAbility.getContext() - data_rdb.getRdbStore(context, STORE_CONFIG_ENCRYPT, 1).then((store) => { + data_rdb.getRdbStore(context, STORE_CONFIG_ENCRYPT).then((store) => { done() expect(store != null).assertTrue(); }).catch((err) => { @@ -124,7 +124,7 @@ describe('relationalStoreEncryptTest', function () { it('RdbEncryptTest_0020', 0, async function (done) { console.info(TAG + "************* RdbEncryptTest_0020 start *************") context = ability_featureAbility.getContext() - let storePromise = data_rdb.getRdbStore(context, STORE_CONFIG_UNENCRYPT, 1); + let storePromise = data_rdb.getRdbStore(context, STORE_CONFIG_UNENCRYPT); storePromise.then((store) => { expect(store != null).assertTrue(); done() diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreExcuteSqlJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreExcuteSqlJsunit.test.js index 6184532c3..bde31f658 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreExcuteSqlJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreExcuteSqlJsunit.test.js @@ -30,7 +30,7 @@ export default function relationalStoreExcuteSqlTest() { describe('relationalStoreExcuteSqlTest', function () { beforeAll(async function () { console.info(TAG + 'beforeAll') - rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG, 1); + rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG); await rdbStore.executeSql(CREATE_TABLE_TEST, null); }) diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreInsertJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreInsertJsunit.test.js index 9d175a130..785015dd4 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreInsertJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreInsertJsunit.test.js @@ -37,7 +37,7 @@ export default function relationalStoreInsertTest() { describe('relationalStoreInsertTest', function () { beforeAll(async function () { console.info(TAG + 'beforeAll') - rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG, 1); + rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG); await rdbStore.executeSql(CREATE_TABLE_TEST, null) await rdbStore.executeSql(CREATE_TABLE_BATCHINSERT_TEST, null); }) diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreJsunit.test.js index 58fc5cde3..0692ec0be 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreJsunit.test.js @@ -57,7 +57,7 @@ describe('relationalStoreTest', function () { */ it('testRdbStore0001', 0, async function (done) { console.info(TAG + "************* testRdbStore0001 start *************"); - await data_Rdb.getRdbStore(context, STORE_CONFIG, 1).then(async (store) => { + await data_Rdb.getRdbStore(context, STORE_CONFIG).then(async (store) => { try { console.info(TAG + "getRdbStore done: " + store); } catch (e) { @@ -77,7 +77,7 @@ describe('relationalStoreTest', function () { */ it('testRdbStore0002', 0, async function (done) { console.info(TAG + "************* testRdbStore0002 start *************"); - let storePromise = data_Rdb.getRdbStore(context, STORE_CONFIG, 2); + let storePromise = data_Rdb.getRdbStore(context, STORE_CONFIG); storePromise.then(async (store) => { try { console.info(TAG + "getRdbStore done: " + store); @@ -107,7 +107,7 @@ describe('relationalStoreTest', function () { securityLevel: data_Rdb.SecurityLevel.S1 } try{ - data_Rdb.getRdbStore(context, storeConfig, 4).then(async (ret) => { + data_Rdb.getRdbStore(context, storeConfig).then(async (ret) => { console.info(TAG + "getRdbStore done" + ret); expect(null).assertFail(); }).catch((err) => { @@ -130,7 +130,7 @@ describe('relationalStoreTest', function () { it('testRdbStore0004', 0, async function (done) { console.info(TAG + "************* testRdbStore0004 start *************"); try{ - let store = await data_Rdb.getRdbStore(context, STORE_CONFIG, 1) + let store = await data_Rdb.getRdbStore(context, STORE_CONFIG) await store.executeSql(CREATE_TABLE_TEST); await data_Rdb.deleteRdbStore(context, "rdbstore.db") }catch (e) { @@ -148,7 +148,7 @@ describe('relationalStoreTest', function () { it('testRdbStore0005', 0, async function (done) { console.info(TAG + "************* testRdbStore0005 start *************"); try { - let store = await data_Rdb.getRdbStore(context, STORE_CONFIG, 2); + let store = await data_Rdb.getRdbStore(context, STORE_CONFIG); console.info(TAG + "Get rdbstore success") await store.executeSql(CREATE_TABLE_TEST); await data_Rdb.deleteRdbStore(context, "rdbstore.db") @@ -172,7 +172,7 @@ describe('relationalStoreTest', function () { name: "rdbstorecontext.db", securityLevel: data_Rdb.SecurityLevel.S1 } - rdbstore = await data_Rdb.getRdbStore(context,STORE_CONFIG, 1) + rdbstore = await data_Rdb.getRdbStore(context,STORE_CONFIG) console.info(TAG + "Get rdbstore success") expect(rdbstore != null).assertTrue(); await data_Rdb.deleteRdbStore(context, STORE_CONFIG.name) @@ -198,7 +198,7 @@ describe('relationalStoreTest', function () { name: "rdbstorecontext.db", securityLevel: data_Rdb.SecurityLevel.S1 } - rdbstore = await data_Rdb.getRdbStore(contextApplication,STORE_CONFIG, 1) + rdbstore = await data_Rdb.getRdbStore(contextApplication,STORE_CONFIG) console.info(TAG + "Get rdbstore success") expect(rdbstore != null).assertTrue(); await data_Rdb.deleteRdbStore(context, STORE_CONFIG.name) @@ -218,7 +218,7 @@ describe('relationalStoreTest', function () { */ it('testRdbStore0008', 0, async function (done) { console.info(TAG + "************* testRdbStore0008 start *************"); - data_Rdb.getRdbStore(context, STORE_CONFIG, 1, async (err,data) => { + data_Rdb.getRdbStore(context, STORE_CONFIG, async (err,data) => { console.info(TAG + "getRdbStore finish") console.info(TAG + "getRdbStore success: " + data) expect(data != null).assertTrue(); @@ -236,7 +236,7 @@ describe('relationalStoreTest', function () { */ it('testRdbStore0009', 0, async function(done){ console.info(TAG + "************* testRdbStore0009 start *************"); - data_Rdb.getRdbStore(contextApplication, STORE_CONFIG, 1, async (err,data) => { + data_Rdb.getRdbStore(contextApplication, STORE_CONFIG, async (err,data) => { console.info(TAG + "getRdbStore finish") console.info(TAG + "getRdbStore success: " + data) expect(data != null).assertTrue(); diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesComplexFiledJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesComplexFiledJsunit.test.js index e30c7931d..793429ff7 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesComplexFiledJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesComplexFiledJsunit.test.js @@ -28,7 +28,7 @@ export default function relationalStorePredicatesComplexFiledTest(){ describe('relationalStorePredicatesComplexFiledTest', function () { beforeAll(async function () { console.info(TAG + 'beforeAll') - rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG, 1); + rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG); await generateTable(); }) diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJoinJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJoinJsunit.test.js index cc639ce1a..aae7cf5ad 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJoinJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJoinJsunit.test.js @@ -52,7 +52,7 @@ describe('relationalStorePredicatesJoinTest', function () { beforeEach(async function () { console.info(TAG + 'beforeEach') - rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG, CURRENT_STORE_VERSION); + rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG); await generateUserTable(); await generateBookTable(); console.info(TAG + 'beforeEach end') diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJsunit.test.js index 6456df3dd..915f76b35 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStorePredicatesJsunit.test.js @@ -37,7 +37,7 @@ export default function relationalStorePredicatesTest() { describe('relationalStorePredicatesTest', function () { beforeAll(async function () { console.info(TAG + 'beforeAll') - rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG, 1); + rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG); await rdbStore.executeSql(CREATE_TABLE_ALL_DATA_TYPE_SQL, null); await buildAllDataType1(); await buildAllDataType2(); diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreQuery.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreQuery.test.js index f558092ce..d4e5cd50e 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreQuery.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreQuery.test.js @@ -33,7 +33,7 @@ var rdbStore var context = ability_featureAbility.getContext() async function CreatRdbStore(context, STORE_CONFIG) { - let RdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG, 1) + let RdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG) await RdbStore.executeSql(CREATE_TABLE_TEST, null) let u8 = new Uint8Array([1, 2, 3]) { diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreResultSetJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreResultSetJsunit.test.js index 9cf8aaa1c..6a5069fe8 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreResultSetJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreResultSetJsunit.test.js @@ -66,7 +66,7 @@ export default function relationalStoreResultSetTest() { describe('relationalStoreResultSetTest', function () { beforeAll(async function () { console.info(TAG + 'beforeAll') - rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG, 1); + rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG); await rdbStore.executeSql(CREATE_TABLE_TEST, null); await createTest(); }) diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreTransactionJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreTransactionJsunit.test.js index dec5c727a..fe98c636c 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreTransactionJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreTransactionJsunit.test.js @@ -36,7 +36,7 @@ describe('relationalStoreTransactionTest', function () { beforeEach(async function () { console.info(TAG + 'beforeEach') - rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG, 1); + rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG); await rdbStore.executeSql(CREATE_TABLE_TEST, null); }) diff --git a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreUpdateJsunit.test.js b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreUpdateJsunit.test.js index 47935848c..de43eb656 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreUpdateJsunit.test.js +++ b/distributeddatamgr/relationalStoretest/relationalStoreJstest/hap/src/main/js/test/RelationalStoreUpdateJsunit.test.js @@ -33,7 +33,7 @@ describe('relationalStoreUpdateTest', function () { beforeEach(async function () { console.info(TAG + 'beforeEach') - rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG, 1); + rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG); await rdbStore.executeSql(CREATE_TABLE_TEST, null); }) diff --git a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreDistributedEtsunit.test.ets b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreDistributedEtsunit.test.ets index b490f8b60..dfd925b59 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreDistributedEtsunit.test.ets +++ b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreDistributedEtsunit.test.ets @@ -34,7 +34,7 @@ describe('relationalStoreDistributedTest', function () { }) beforeEach(async function () { - rdbStore = await dataRdb.getRdbStore(context, config, 1); + rdbStore = await dataRdb.getRdbStore(context, config); await rdbStore.executeSql(CREATE_TABLE_TEST, null) console.info(TAG + 'beforeEach') }) diff --git a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreEtsunit.test.ets b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreEtsunit.test.ets index 9e77ee6a3..29f2fd8f3 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreEtsunit.test.ets +++ b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreEtsunit.test.ets @@ -55,7 +55,7 @@ describe('relationalStoreTest', function () { name: "secure.db", securityLevel: dataRdb.SecurityLevel.S1 } - let storePromise = dataRdb.getRdbStore(context, config, 1); + let storePromise = dataRdb.getRdbStore(context, config); storePromise.then(async (store) => { try { await store.executeSql(CREATE_TABLE_TEST); @@ -84,7 +84,7 @@ describe('relationalStoreTest', function () { name: "secure.db", securityLevel: dataRdb.SecurityLevel.S2 } - let storePromise = dataRdb.getRdbStore(context, config, 1); + let storePromise = dataRdb.getRdbStore(context, config); storePromise.then(async (store) => { try { await store.executeSql(CREATE_TABLE_TEST); @@ -113,7 +113,7 @@ describe('relationalStoreTest', function () { name: "secure.db", securityLevel: dataRdb.SecurityLevel.S3 } - let storePromise = dataRdb.getRdbStore(context, config, 1); + let storePromise = dataRdb.getRdbStore(context, config); storePromise.then(async (store) => { try { await store.executeSql(CREATE_TABLE_TEST); @@ -142,7 +142,7 @@ describe('relationalStoreTest', function () { name: "secure.db", securityLevel: dataRdb.SecurityLevel.S4 } - let storePromise = dataRdb.getRdbStore(context, config, 1); + let storePromise = dataRdb.getRdbStore(context, config); storePromise.then(async (store) => { try { await store.executeSql(CREATE_TABLE_TEST); @@ -171,7 +171,7 @@ describe('relationalStoreTest', function () { name: "secure.db", securityLevel: dataRdb.SecurityLevel.S1 } - dataRdb.getRdbStore(context, config, 1, async (err,data) => { + dataRdb.getRdbStore(context, config, async (err,data) => { if(err != null){ console.info(TAG + "get rdb store error" + err.message) expect(null).assertFail(); @@ -198,7 +198,7 @@ describe('relationalStoreTest', function () { name: "secure.db", securityLevel: dataRdb.SecurityLevel.S2 } - dataRdb.getRdbStore(context, config, 1,async (err,data) => { + dataRdb.getRdbStore(context, config,async (err,data) => { if(err != null){ console.info(TAG + "get rdb store error") expect(null).assertFail(); @@ -224,7 +224,7 @@ describe('relationalStoreTest', function () { name: "secure.db", securityLevel: dataRdb.SecurityLevel.S3 } - dataRdb.getRdbStore(context, config, 1,async (err,data) => { + dataRdb.getRdbStore(context, config,async (err,data) => { if(err != null){ console.info(TAG + "get rdb store error") expect(null).assertFail(); @@ -250,7 +250,7 @@ describe('relationalStoreTest', function () { name: "secure.db", securityLevel: dataRdb.SecurityLevel.S4 } - dataRdb.getRdbStore(context, config, 1,async (err,data) => { + dataRdb.getRdbStore(context, config,async (err,data) => { if(err != null){ console.info(TAG + "get rdb store error") expect(null).assertFail(); @@ -277,7 +277,7 @@ describe('relationalStoreTest', function () { securityLevel: dataRdb.SecurityLevel.S4 } let deleteResult = false - await dataRdb.getRdbStore(context, config, 1).then(async (store) => { + await dataRdb.getRdbStore(context, config).then(async (store) => { console.info(TAG + "create table success") }) await dataRdb.deleteRdbStore(context,"secure.db").then(() => { @@ -302,7 +302,7 @@ describe('relationalStoreTest', function () { securityLevel: dataRdb.SecurityLevel.S1 } let deleteResult = false - await dataRdb.getRdbStore(context, config, 1).then(async (store) => { + await dataRdb.getRdbStore(context, config).then(async (store) => { console.info(TAG + "create rdb store success") }) dataRdb.deleteRdbStore(context,"secure.db", (err, data) => { diff --git a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreTestResultsetEtsunit.test.ets b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreTestResultsetEtsunit.test.ets index d39ffd0b3..cbb20c72b 100644 --- a/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreTestResultsetEtsunit.test.ets +++ b/distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/test/relationalStoreTestResultsetEtsunit.test.ets @@ -29,7 +29,7 @@ export default function relationalStoreResultSetTest(context) { describe('relationalStoreResultSetTest', function () { beforeAll(async function () { console.info(TAG + 'beforeAll') - rdbStore = await dataRdb.getRdbStore(context, STORE_CONFIG, 1); + rdbStore = await dataRdb.getRdbStore(context, STORE_CONFIG); await rdbStore.executeSql(CREATE_TABLE_TEST, null); await createTest(); }) -- GitLab