提交 df947c10 编写于 作者: Y yanglifeng1217

<modified>

Signed-off-by: Nyanglifeng1217 <yanglifeng5@huawei.com>
上级 a924f4d0
...@@ -30,7 +30,7 @@ const STORE_CONFIG = { ...@@ -30,7 +30,7 @@ const STORE_CONFIG = {
const DATABASE_BACKUP_NAME = "Backup.db" const DATABASE_BACKUP_NAME = "Backup.db"
async function CreatRdbStore(context, STORE_CONFIG) { 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) await RdbStore.executeSql(CREATE_TABLE_TEST, null)
let u8 = new Uint8Array([1, 2, 3]) let u8 = new Uint8Array([1, 2, 3])
{ {
......
...@@ -30,7 +30,7 @@ const STORE_CONFIG = { ...@@ -30,7 +30,7 @@ const STORE_CONFIG = {
const DATABASE_BACKUP_NAME = "Backup.db" const DATABASE_BACKUP_NAME = "Backup.db"
async function CreatRdbStore(context, STORE_CONFIG) { 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) await RdbStore.executeSql(CREATE_TABLE_TEST, null)
let u8 = new Uint8Array([1, 2, 3]) let u8 = new Uint8Array([1, 2, 3])
{ {
......
...@@ -34,7 +34,7 @@ describe('relationalStoreDeleteTest', function () { ...@@ -34,7 +34,7 @@ describe('relationalStoreDeleteTest', function () {
beforeEach(async function () { beforeEach(async function () {
console.info(TAG + 'beforeEach') 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); await rdbStore.executeSql(CREATE_TABLE_TEST, null);
}) })
......
...@@ -67,7 +67,7 @@ export default function relationalStoreDistributedTest() { ...@@ -67,7 +67,7 @@ export default function relationalStoreDistributedTest() {
describe('relationalStoreDistributedTest', function () { describe('relationalStoreDistributedTest', function () {
beforeAll(async function () { beforeAll(async function () {
console.info(TAG + 'beforeAll') 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") console.info(TAG + "create RelationalStore store success")
await executeSql1() await executeSql1()
await executeSql2() await executeSql2()
...@@ -399,7 +399,7 @@ describe('relationalStoreDistributedTest', function () { ...@@ -399,7 +399,7 @@ describe('relationalStoreDistributedTest', function () {
"name": STORE_NAME, "name": STORE_NAME,
securityLevel: data_Rdb.SecurityLevel.S1 securityLevel: data_Rdb.SecurityLevel.S1
} }
rdbStore = await data_Rdb.getRdbStore(context, config, 1); rdbStore = await data_Rdb.getRdbStore(context, config);
let errInfo = undefined let errInfo = undefined
try{ try{
rdbStore.obtainDistributedTableName(["deviceId"], "EMPLOYEE") rdbStore.obtainDistributedTableName(["deviceId"], "EMPLOYEE")
......
...@@ -41,7 +41,7 @@ const STORE_CONFIG_WRONG = { ...@@ -41,7 +41,7 @@ const STORE_CONFIG_WRONG = {
export default function relationalStoreEncryptTest() { export default function relationalStoreEncryptTest() {
async function CreatRdbStore(context, STORE_CONFIG) { 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) await rdbStore.executeSql(CREATE_TABLE_TEST, null)
let u8 = new Uint8Array([1, 2, 3]) let u8 = new Uint8Array([1, 2, 3])
{ {
...@@ -107,7 +107,7 @@ describe('relationalStoreEncryptTest', function () { ...@@ -107,7 +107,7 @@ describe('relationalStoreEncryptTest', function () {
it('RdbEncryptTest_0010', 0, async function (done) { it('RdbEncryptTest_0010', 0, async function (done) {
console.info(TAG + "************* RdbEncryptTest_0010 start *************") console.info(TAG + "************* RdbEncryptTest_0010 start *************")
context = ability_featureAbility.getContext() context = ability_featureAbility.getContext()
data_rdb.getRdbStore(context, STORE_CONFIG_ENCRYPT, 1).then((store) => { data_rdb.getRdbStore(context, STORE_CONFIG_ENCRYPT).then((store) => {
done() done()
expect(store != null).assertTrue(); expect(store != null).assertTrue();
}).catch((err) => { }).catch((err) => {
...@@ -124,7 +124,7 @@ describe('relationalStoreEncryptTest', function () { ...@@ -124,7 +124,7 @@ describe('relationalStoreEncryptTest', function () {
it('RdbEncryptTest_0020', 0, async function (done) { it('RdbEncryptTest_0020', 0, async function (done) {
console.info(TAG + "************* RdbEncryptTest_0020 start *************") console.info(TAG + "************* RdbEncryptTest_0020 start *************")
context = ability_featureAbility.getContext() 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) => { storePromise.then((store) => {
expect(store != null).assertTrue(); expect(store != null).assertTrue();
done() done()
......
...@@ -30,7 +30,7 @@ export default function relationalStoreExcuteSqlTest() { ...@@ -30,7 +30,7 @@ export default function relationalStoreExcuteSqlTest() {
describe('relationalStoreExcuteSqlTest', function () { describe('relationalStoreExcuteSqlTest', function () {
beforeAll(async function () { beforeAll(async function () {
console.info(TAG + 'beforeAll') 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_TEST, null);
}) })
......
...@@ -37,7 +37,7 @@ export default function relationalStoreInsertTest() { ...@@ -37,7 +37,7 @@ export default function relationalStoreInsertTest() {
describe('relationalStoreInsertTest', function () { describe('relationalStoreInsertTest', function () {
beforeAll(async function () { beforeAll(async function () {
console.info(TAG + 'beforeAll') 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_TEST, null)
await rdbStore.executeSql(CREATE_TABLE_BATCHINSERT_TEST, null); await rdbStore.executeSql(CREATE_TABLE_BATCHINSERT_TEST, null);
}) })
......
...@@ -57,7 +57,7 @@ describe('relationalStoreTest', function () { ...@@ -57,7 +57,7 @@ describe('relationalStoreTest', function () {
*/ */
it('testRdbStore0001', 0, async function (done) { it('testRdbStore0001', 0, async function (done) {
console.info(TAG + "************* testRdbStore0001 start *************"); 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 { try {
console.info(TAG + "getRdbStore done: " + store); console.info(TAG + "getRdbStore done: " + store);
} catch (e) { } catch (e) {
...@@ -77,7 +77,7 @@ describe('relationalStoreTest', function () { ...@@ -77,7 +77,7 @@ describe('relationalStoreTest', function () {
*/ */
it('testRdbStore0002', 0, async function (done) { it('testRdbStore0002', 0, async function (done) {
console.info(TAG + "************* testRdbStore0002 start *************"); 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) => { storePromise.then(async (store) => {
try { try {
console.info(TAG + "getRdbStore done: " + store); console.info(TAG + "getRdbStore done: " + store);
...@@ -107,7 +107,7 @@ describe('relationalStoreTest', function () { ...@@ -107,7 +107,7 @@ describe('relationalStoreTest', function () {
securityLevel: data_Rdb.SecurityLevel.S1 securityLevel: data_Rdb.SecurityLevel.S1
} }
try{ try{
data_Rdb.getRdbStore(context, storeConfig, 4).then(async (ret) => { data_Rdb.getRdbStore(context, storeConfig).then(async (ret) => {
console.info(TAG + "getRdbStore done" + ret); console.info(TAG + "getRdbStore done" + ret);
expect(null).assertFail(); expect(null).assertFail();
}).catch((err) => { }).catch((err) => {
...@@ -130,7 +130,7 @@ describe('relationalStoreTest', function () { ...@@ -130,7 +130,7 @@ describe('relationalStoreTest', function () {
it('testRdbStore0004', 0, async function (done) { it('testRdbStore0004', 0, async function (done) {
console.info(TAG + "************* testRdbStore0004 start *************"); console.info(TAG + "************* testRdbStore0004 start *************");
try{ 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 store.executeSql(CREATE_TABLE_TEST);
await data_Rdb.deleteRdbStore(context, "rdbstore.db") await data_Rdb.deleteRdbStore(context, "rdbstore.db")
}catch (e) { }catch (e) {
...@@ -148,7 +148,7 @@ describe('relationalStoreTest', function () { ...@@ -148,7 +148,7 @@ describe('relationalStoreTest', function () {
it('testRdbStore0005', 0, async function (done) { it('testRdbStore0005', 0, async function (done) {
console.info(TAG + "************* testRdbStore0005 start *************"); console.info(TAG + "************* testRdbStore0005 start *************");
try { 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") console.info(TAG + "Get rdbstore success")
await store.executeSql(CREATE_TABLE_TEST); await store.executeSql(CREATE_TABLE_TEST);
await data_Rdb.deleteRdbStore(context, "rdbstore.db") await data_Rdb.deleteRdbStore(context, "rdbstore.db")
...@@ -172,7 +172,7 @@ describe('relationalStoreTest', function () { ...@@ -172,7 +172,7 @@ describe('relationalStoreTest', function () {
name: "rdbstorecontext.db", name: "rdbstorecontext.db",
securityLevel: data_Rdb.SecurityLevel.S1 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") console.info(TAG + "Get rdbstore success")
expect(rdbstore != null).assertTrue(); expect(rdbstore != null).assertTrue();
await data_Rdb.deleteRdbStore(context, STORE_CONFIG.name) await data_Rdb.deleteRdbStore(context, STORE_CONFIG.name)
...@@ -198,7 +198,7 @@ describe('relationalStoreTest', function () { ...@@ -198,7 +198,7 @@ describe('relationalStoreTest', function () {
name: "rdbstorecontext.db", name: "rdbstorecontext.db",
securityLevel: data_Rdb.SecurityLevel.S1 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") console.info(TAG + "Get rdbstore success")
expect(rdbstore != null).assertTrue(); expect(rdbstore != null).assertTrue();
await data_Rdb.deleteRdbStore(context, STORE_CONFIG.name) await data_Rdb.deleteRdbStore(context, STORE_CONFIG.name)
...@@ -218,7 +218,7 @@ describe('relationalStoreTest', function () { ...@@ -218,7 +218,7 @@ describe('relationalStoreTest', function () {
*/ */
it('testRdbStore0008', 0, async function (done) { it('testRdbStore0008', 0, async function (done) {
console.info(TAG + "************* testRdbStore0008 start *************"); 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 finish")
console.info(TAG + "getRdbStore success: " + data) console.info(TAG + "getRdbStore success: " + data)
expect(data != null).assertTrue(); expect(data != null).assertTrue();
...@@ -236,7 +236,7 @@ describe('relationalStoreTest', function () { ...@@ -236,7 +236,7 @@ describe('relationalStoreTest', function () {
*/ */
it('testRdbStore0009', 0, async function(done){ it('testRdbStore0009', 0, async function(done){
console.info(TAG + "************* testRdbStore0009 start *************"); 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 finish")
console.info(TAG + "getRdbStore success: " + data) console.info(TAG + "getRdbStore success: " + data)
expect(data != null).assertTrue(); expect(data != null).assertTrue();
......
...@@ -28,7 +28,7 @@ export default function relationalStorePredicatesComplexFiledTest(){ ...@@ -28,7 +28,7 @@ export default function relationalStorePredicatesComplexFiledTest(){
describe('relationalStorePredicatesComplexFiledTest', function () { describe('relationalStorePredicatesComplexFiledTest', function () {
beforeAll(async function () { beforeAll(async function () {
console.info(TAG + 'beforeAll') console.info(TAG + 'beforeAll')
rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG, 1); rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG);
await generateTable(); await generateTable();
}) })
......
...@@ -52,7 +52,7 @@ describe('relationalStorePredicatesJoinTest', function () { ...@@ -52,7 +52,7 @@ describe('relationalStorePredicatesJoinTest', function () {
beforeEach(async function () { beforeEach(async function () {
console.info(TAG + 'beforeEach') 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 generateUserTable();
await generateBookTable(); await generateBookTable();
console.info(TAG + 'beforeEach end') console.info(TAG + 'beforeEach end')
......
...@@ -37,7 +37,7 @@ export default function relationalStorePredicatesTest() { ...@@ -37,7 +37,7 @@ export default function relationalStorePredicatesTest() {
describe('relationalStorePredicatesTest', function () { describe('relationalStorePredicatesTest', function () {
beforeAll(async function () { beforeAll(async function () {
console.info(TAG + 'beforeAll') 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 rdbStore.executeSql(CREATE_TABLE_ALL_DATA_TYPE_SQL, null);
await buildAllDataType1(); await buildAllDataType1();
await buildAllDataType2(); await buildAllDataType2();
......
...@@ -33,7 +33,7 @@ var rdbStore ...@@ -33,7 +33,7 @@ var rdbStore
var context = ability_featureAbility.getContext() var context = ability_featureAbility.getContext()
async function CreatRdbStore(context, STORE_CONFIG) { 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) await RdbStore.executeSql(CREATE_TABLE_TEST, null)
let u8 = new Uint8Array([1, 2, 3]) let u8 = new Uint8Array([1, 2, 3])
{ {
......
...@@ -66,7 +66,7 @@ export default function relationalStoreResultSetTest() { ...@@ -66,7 +66,7 @@ export default function relationalStoreResultSetTest() {
describe('relationalStoreResultSetTest', function () { describe('relationalStoreResultSetTest', function () {
beforeAll(async function () { beforeAll(async function () {
console.info(TAG + 'beforeAll') 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_TEST, null);
await createTest(); await createTest();
}) })
......
...@@ -36,7 +36,7 @@ describe('relationalStoreTransactionTest', function () { ...@@ -36,7 +36,7 @@ describe('relationalStoreTransactionTest', function () {
beforeEach(async function () { beforeEach(async function () {
console.info(TAG + 'beforeEach') 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); await rdbStore.executeSql(CREATE_TABLE_TEST, null);
}) })
......
...@@ -33,7 +33,7 @@ describe('relationalStoreUpdateTest', function () { ...@@ -33,7 +33,7 @@ describe('relationalStoreUpdateTest', function () {
beforeEach(async function () { beforeEach(async function () {
console.info(TAG + 'beforeEach') 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); await rdbStore.executeSql(CREATE_TABLE_TEST, null);
}) })
......
...@@ -34,7 +34,7 @@ describe('relationalStoreDistributedTest', function () { ...@@ -34,7 +34,7 @@ describe('relationalStoreDistributedTest', function () {
}) })
beforeEach(async function () { beforeEach(async function () {
rdbStore = await dataRdb.getRdbStore(context, config, 1); rdbStore = await dataRdb.getRdbStore(context, config);
await rdbStore.executeSql(CREATE_TABLE_TEST, null) await rdbStore.executeSql(CREATE_TABLE_TEST, null)
console.info(TAG + 'beforeEach') console.info(TAG + 'beforeEach')
}) })
......
...@@ -55,7 +55,7 @@ describe('relationalStoreTest', function () { ...@@ -55,7 +55,7 @@ describe('relationalStoreTest', function () {
name: "secure.db", name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S1 securityLevel: dataRdb.SecurityLevel.S1
} }
let storePromise = dataRdb.getRdbStore(context, config, 1); let storePromise = dataRdb.getRdbStore(context, config);
storePromise.then(async (store) => { storePromise.then(async (store) => {
try { try {
await store.executeSql(CREATE_TABLE_TEST); await store.executeSql(CREATE_TABLE_TEST);
...@@ -84,7 +84,7 @@ describe('relationalStoreTest', function () { ...@@ -84,7 +84,7 @@ describe('relationalStoreTest', function () {
name: "secure.db", name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S2 securityLevel: dataRdb.SecurityLevel.S2
} }
let storePromise = dataRdb.getRdbStore(context, config, 1); let storePromise = dataRdb.getRdbStore(context, config);
storePromise.then(async (store) => { storePromise.then(async (store) => {
try { try {
await store.executeSql(CREATE_TABLE_TEST); await store.executeSql(CREATE_TABLE_TEST);
...@@ -113,7 +113,7 @@ describe('relationalStoreTest', function () { ...@@ -113,7 +113,7 @@ describe('relationalStoreTest', function () {
name: "secure.db", name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S3 securityLevel: dataRdb.SecurityLevel.S3
} }
let storePromise = dataRdb.getRdbStore(context, config, 1); let storePromise = dataRdb.getRdbStore(context, config);
storePromise.then(async (store) => { storePromise.then(async (store) => {
try { try {
await store.executeSql(CREATE_TABLE_TEST); await store.executeSql(CREATE_TABLE_TEST);
...@@ -142,7 +142,7 @@ describe('relationalStoreTest', function () { ...@@ -142,7 +142,7 @@ describe('relationalStoreTest', function () {
name: "secure.db", name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S4 securityLevel: dataRdb.SecurityLevel.S4
} }
let storePromise = dataRdb.getRdbStore(context, config, 1); let storePromise = dataRdb.getRdbStore(context, config);
storePromise.then(async (store) => { storePromise.then(async (store) => {
try { try {
await store.executeSql(CREATE_TABLE_TEST); await store.executeSql(CREATE_TABLE_TEST);
...@@ -171,7 +171,7 @@ describe('relationalStoreTest', function () { ...@@ -171,7 +171,7 @@ describe('relationalStoreTest', function () {
name: "secure.db", name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S1 securityLevel: dataRdb.SecurityLevel.S1
} }
dataRdb.getRdbStore(context, config, 1, async (err,data) => { dataRdb.getRdbStore(context, config, async (err,data) => {
if(err != null){ if(err != null){
console.info(TAG + "get rdb store error" + err.message) console.info(TAG + "get rdb store error" + err.message)
expect(null).assertFail(); expect(null).assertFail();
...@@ -198,7 +198,7 @@ describe('relationalStoreTest', function () { ...@@ -198,7 +198,7 @@ describe('relationalStoreTest', function () {
name: "secure.db", name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S2 securityLevel: dataRdb.SecurityLevel.S2
} }
dataRdb.getRdbStore(context, config, 1,async (err,data) => { dataRdb.getRdbStore(context, config,async (err,data) => {
if(err != null){ if(err != null){
console.info(TAG + "get rdb store error") console.info(TAG + "get rdb store error")
expect(null).assertFail(); expect(null).assertFail();
...@@ -224,7 +224,7 @@ describe('relationalStoreTest', function () { ...@@ -224,7 +224,7 @@ describe('relationalStoreTest', function () {
name: "secure.db", name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S3 securityLevel: dataRdb.SecurityLevel.S3
} }
dataRdb.getRdbStore(context, config, 1,async (err,data) => { dataRdb.getRdbStore(context, config,async (err,data) => {
if(err != null){ if(err != null){
console.info(TAG + "get rdb store error") console.info(TAG + "get rdb store error")
expect(null).assertFail(); expect(null).assertFail();
...@@ -250,7 +250,7 @@ describe('relationalStoreTest', function () { ...@@ -250,7 +250,7 @@ describe('relationalStoreTest', function () {
name: "secure.db", name: "secure.db",
securityLevel: dataRdb.SecurityLevel.S4 securityLevel: dataRdb.SecurityLevel.S4
} }
dataRdb.getRdbStore(context, config, 1,async (err,data) => { dataRdb.getRdbStore(context, config,async (err,data) => {
if(err != null){ if(err != null){
console.info(TAG + "get rdb store error") console.info(TAG + "get rdb store error")
expect(null).assertFail(); expect(null).assertFail();
...@@ -277,7 +277,7 @@ describe('relationalStoreTest', function () { ...@@ -277,7 +277,7 @@ describe('relationalStoreTest', function () {
securityLevel: dataRdb.SecurityLevel.S4 securityLevel: dataRdb.SecurityLevel.S4
} }
let deleteResult = false 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") console.info(TAG + "create table success")
}) })
await dataRdb.deleteRdbStore(context,"secure.db").then(() => { await dataRdb.deleteRdbStore(context,"secure.db").then(() => {
...@@ -302,7 +302,7 @@ describe('relationalStoreTest', function () { ...@@ -302,7 +302,7 @@ describe('relationalStoreTest', function () {
securityLevel: dataRdb.SecurityLevel.S1 securityLevel: dataRdb.SecurityLevel.S1
} }
let deleteResult = false 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") console.info(TAG + "create rdb store success")
}) })
dataRdb.deleteRdbStore(context,"secure.db", (err, data) => { dataRdb.deleteRdbStore(context,"secure.db", (err, data) => {
......
...@@ -29,7 +29,7 @@ export default function relationalStoreResultSetTest(context) { ...@@ -29,7 +29,7 @@ export default function relationalStoreResultSetTest(context) {
describe('relationalStoreResultSetTest', function () { describe('relationalStoreResultSetTest', function () {
beforeAll(async function () { beforeAll(async function () {
console.info(TAG + 'beforeAll') 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 rdbStore.executeSql(CREATE_TABLE_TEST, null);
await createTest(); await createTest();
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册