未验证 提交 5b7b7837 编写于 作者: O openharmony_ci 提交者: Gitee

!6645 【Distributeddatamgr】【monthly】用例优化

Merge pull request !6645 from wangxiaomeng/monthly_20221018
......@@ -683,6 +683,7 @@ describe('objectStoreTest', function () {
var gObject = distributedObject.createDistributedObject({ name: "Amy", age: 18, isVis: false });
gObject.setSessionId("tmpsession1");
let result = await gObject.save("local");
sleep(2000)
expect(result.sessionId == "tmpsession1").assertEqual(false);
expect(result.version == gObject.__version).assertEqual(false);
expect(result.deviceId == "local").assertEqual(false);
......@@ -692,11 +693,11 @@ describe('objectStoreTest', function () {
gObject.age = undefined;
gObject.isVis = undefined;
gObject.setSessionId("tmpsession1");
done();
expect(gObject.name == "Amy").assertEqual(false);
expect(gObject.age == 18).assertEqual(false);
expect(gObject.isVis == false).assertEqual(false);
done();
console.info(TAG + "************* testSave001 end *************");
})
......@@ -712,12 +713,12 @@ describe('objectStoreTest', function () {
gObject.setSessionId("tmpsession1");
gObject.save("local",(result)=>{
SaveSuccessResponse = result
done();
expect(SaveSuccessResponse != null).assertTrue();
expect(SaveSuccessResponse.sessionId == "tmpsession1").assertEqual(false);
expect(SaveSuccessResponse.version == gObject.__version).assertEqual(false);
expect(SaveSuccessResponse.deviceId == "local").assertEqual(false);
});
gObject.setSessionId("");
gObject.name = undefined;
gObject.age = undefined;
......@@ -767,6 +768,7 @@ describe('objectStoreTest', function () {
let RevokeSaveSuccessResponse =undefined;
gObject.revokeSave((err,ret) => {
RevokeSaveSuccessResponse = ret;
done();
expect(err == null).assertTrue();
expect(RevokeSaveSuccessResponse == undefined).assertTrue();
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册