未验证 提交 13b92f65 编写于 作者: O openharmony_ci 提交者: Gitee

!8104 【Distributeddatamgr】【OpenHarmony-3.2-Release】用例优化add 801

Merge pull request !8104 from yanglifeng/OpenHarmony-3.2-Release
...@@ -17,6 +17,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from ' ...@@ -17,6 +17,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
import data_Rdb from '@ohos.data.relationalStore'; import data_Rdb from '@ohos.data.relationalStore';
import ability_featureAbility from '@ohos.ability.featureAbility'; import ability_featureAbility from '@ohos.ability.featureAbility';
const ERRCODE = 801;
var context = ability_featureAbility.getContext(); var context = ability_featureAbility.getContext();
var sqlStatement = "CREATE TABLE IF NOT EXISTS employee (" + var sqlStatement = "CREATE TABLE IF NOT EXISTS employee (" +
"id INTEGER PRIMARY KEY AUTOINCREMENT," + "id INTEGER PRIMARY KEY AUTOINCREMENT," +
...@@ -100,8 +101,8 @@ describe('relationalStoreDistributedTest', function () { ...@@ -100,8 +101,8 @@ describe('relationalStoreDistributedTest', function () {
console.info(TAG + "set none to be distributed table success"); console.info(TAG + "set none to be distributed table success");
expect(rdbStore).assertEqual(rdbStore) expect(rdbStore).assertEqual(rdbStore)
} catch (err) { } catch (err) {
console.info(TAG + "set none to be distributed table failed"); console.info(TAG + "setDistributed002 failed"+ `, error code is ${err.code}, message is ${err.message}`);
expect(null).assertFail(); expect(err.code).assertEqual(ERRCODE);
} }
done() done()
console.info(TAG + "************* testRdbStoreDistributed002 end *************"); console.info(TAG + "************* testRdbStoreDistributed002 end *************");
...@@ -119,8 +120,8 @@ describe('relationalStoreDistributedTest', function () { ...@@ -119,8 +120,8 @@ describe('relationalStoreDistributedTest', function () {
console.info(TAG + "set employee to be distributed table success"); console.info(TAG + "set employee to be distributed table success");
expect(rdbStore).assertEqual(rdbStore) expect(rdbStore).assertEqual(rdbStore)
} catch (err) { } catch (err) {
console.info(TAG + "set employee to be distributed table failed"); console.info(TAG + "setDistributed003 failed"+ `, error code is ${err.code}, message is ${err.message}`);
expect(null).assertFail(); expect(err.code).assertEqual(ERRCODE);
} }
done() done()
console.info(TAG + "************* testRdbStoreDistributed003 end *************"); console.info(TAG + "************* testRdbStoreDistributed003 end *************");
...@@ -138,8 +139,8 @@ describe('relationalStoreDistributedTest', function () { ...@@ -138,8 +139,8 @@ describe('relationalStoreDistributedTest', function () {
console.info(TAG + "set employee and product to be distributed table success"); console.info(TAG + "set employee and product to be distributed table success");
expect(rdbStore).assertEqual(rdbStore) expect(rdbStore).assertEqual(rdbStore)
} catch (err) { } catch (err) {
console.info(TAG + "set employee and product to be distributed table failed"); console.info(TAG + "setDistributed004 failed"+ `, error code is ${err.code}, message is ${err.message}`);
expect(null).assertFail(); expect(err.code).assertEqual(ERRCODE);
} }
done() done()
console.info(TAG + "************* testRdbStoreDistributed004 end *************"); console.info(TAG + "************* testRdbStoreDistributed004 end *************");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册