提交 cef5d3ad 编写于 作者: L lixinyi

xts_distributeddatamgr

Signed-off-by: Nlixinyi <lixinyi38@huawei.com>
上级 2ab037b5
......@@ -89,7 +89,7 @@ export default function preferencesCallBackTest() {
});
} catch (err) {
console.info("testPreferencesGetPreferences002 fail: " + err.message + "code: " + err.code);
expect(err.code === "401" && err.message === "Parameter error. The type of 'name' must be a without path non empty string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
});
......@@ -145,7 +145,7 @@ export default function preferencesCallBackTest() {
});
} catch (err) {
console.info("testPreferencesDeletePreferences001 fail: " + err.message + "code: " + err.code);
expect(err.code === "401" && err.message === "Parameter error. The type of 'name' must be a without path non empty string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
}
......@@ -239,7 +239,7 @@ export default function preferencesCallBackTest() {
});
} catch (err) {
console.info("testRemovePreferencesFromCache001 fail: " + err.message + "code: " + err.code);
expect(err.code === "401" && err.message === "Parameter error. The type of 'name' must be a without path non empty string.").assertTrue();
expect(err.code === "401").assertTrue();
done();
}
}
......
......@@ -26,7 +26,7 @@ const MAX_VALUE_LENGTH = 'y'.repeat(8192)
var mPref;
export default function storagePromiseTest() {
describe('storagePromiseTest', function () {
describe('storagePromiseTest', function (done) {
beforeAll(async function () {
console.info('beforeAll')
const promise = storage.getStorage(PATH);
......
......@@ -36,7 +36,7 @@ describe('rdbstoreInsertTest', function () {
console.info(TAG + 'beforeAll')
rdbStore = await dataRdb.getRdbStore(STORE_CONFIG, 1);
await rdbStore.executeSql(CREATE_TABLE_TEST, null)
await rdbStore.executeSql(CREATE_TABLE_BATCHINSERT_TEST, null);
})
beforeEach(async function () {
......
......@@ -19,6 +19,7 @@ import abilityFeatureAbility from '@ohos.ability.featureAbility';
var context = abilityFeatureAbility.getContext();
var contextApplication = context.getApplicationContext()
var rdbStore = undefined;
const TAG = "[RDB_JSKITS_TEST]"
const CREATE_TABLE_TEST = "CREATE TABLE IF NOT EXISTS test (" + "id INTEGER PRIMARY KEY AUTOINCREMENT, " + "name TEXT NOT NULL, " + "age INTEGER, " + "salary REAL, " + "blobType BLOB)";
......
......@@ -39,7 +39,7 @@ describe('relationalStoreInsertTest', function () {
console.info(TAG + 'beforeAll')
rdbStore = await data_Rdb.getRdbStore(context, STORE_CONFIG);
await rdbStore.executeSql(CREATE_TABLE_TEST, null)
await rdbStore.executeSql(CREATE_TABLE_BATCHINSERT_TEST, null);
})
beforeEach(async function () {
......
......@@ -25,6 +25,7 @@ const STORE_CONFIG = {
securityLevel: data_Rdb.SecurityLevel.S1
}
const TEST_BUNDLE_NAME="ohos.acts.relationalstorejstest"
const TEST_STORE_ID="storeId";
var kvManager = null
var kvStore = null
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册