未验证 提交 0d053c68 编写于 作者: O openharmony_ci 提交者: Gitee

!8897 【Account】【Master】DistributedAccount Xts Stability Issues Fix

Merge pull request !8897 from zhaimengchao/master
...@@ -154,7 +154,7 @@ export default function AccountTest() { ...@@ -154,7 +154,7 @@ export default function AccountTest() {
}; };
try { try {
await accountAbility.updateOsAccountDistributedInfo(obj).then(function () { await accountAbility.updateOsAccountDistributedInfo(obj).then(function () {
accountAbility.queryOsAccountDistributedInfo(function (err, data) { accountAbility.queryOsAccountDistributedInfo(async function (err, data) {
console.debug('====>account_updateOsAccountDistributedInfo_test001 data:' + JSON.stringify(data)) console.debug('====>account_updateOsAccountDistributedInfo_test001 data:' + JSON.stringify(data))
expect(data.name).assertEqual('ZhangSan') expect(data.name).assertEqual('ZhangSan')
expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5')
...@@ -163,15 +163,12 @@ export default function AccountTest() { ...@@ -163,15 +163,12 @@ export default function AccountTest() {
name: 'ZhangSan', name: 'ZhangSan',
event: 'Ohos.account.event.LOGOUT' event: 'Ohos.account.event.LOGOUT'
}; };
accountAbility.updateOsAccountDistributedInfo(obj).then(function (err) { await accountAbility.updateOsAccountDistributedInfo(obj).then(function (err) {
expect(err).assertEqual(undefined) expect(err).assertEqual(undefined)
done();
}); });
}); });
}); });
accountAbility.queryOsAccountDistributedInfo(function (data) {
expect(data).assertEqual(undefined)
done();
})
} catch (err){ } catch (err){
console.debug('====>account_updateOsAccountDistributedInfo_test001 err:' + JSON.stringify(err)) console.debug('====>account_updateOsAccountDistributedInfo_test001 err:' + JSON.stringify(err))
expect().assertFail() expect().assertFail()
...@@ -195,7 +192,7 @@ export default function AccountTest() { ...@@ -195,7 +192,7 @@ export default function AccountTest() {
}; };
try { try {
accountAbility.updateOsAccountDistributedInfo(obj, function () { accountAbility.updateOsAccountDistributedInfo(obj, function () {
accountAbility.queryOsAccountDistributedInfo(function (err, data) { accountAbility.queryOsAccountDistributedInfo(async function (err, data) {
console.debug("====>account_updateOsAccountDistributedInfo_test002 data:" + JSON.stringify(data)) console.debug("====>account_updateOsAccountDistributedInfo_test002 data:" + JSON.stringify(data))
expect(data.name).assertEqual('ZhangSan') expect(data.name).assertEqual('ZhangSan')
expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5')
...@@ -204,8 +201,8 @@ export default function AccountTest() { ...@@ -204,8 +201,8 @@ export default function AccountTest() {
name: 'ZhangSan', name: 'ZhangSan',
event: 'Ohos.account.event.LOGOUT' event: 'Ohos.account.event.LOGOUT'
}; };
accountAbility.updateOsAccountDistributedInfo(obj).then(function (data) { await accountAbility.updateOsAccountDistributedInfo(obj).then(function (err) {
expect(data).assertEqual(undefined) expect(err).assertEqual(undefined)
done(); done();
}); });
}); });
...@@ -233,9 +230,9 @@ export default function AccountTest() { ...@@ -233,9 +230,9 @@ export default function AccountTest() {
scalableData:data scalableData:data
}; };
try { try {
accountAbility.updateOsAccountDistributedInfo(obj, function (result) { accountAbility.updateOsAccountDistributedInfo(obj, async function (result) {
console.debug("====>account_updateOsAccountDistributedInfo_test003 update_err:" + JSON.stringify(result)) console.debug("====>account_updateOsAccountDistributedInfo_test003 update_err:" + JSON.stringify(result))
accountAbility.queryOsAccountDistributedInfo(obj).then(function (data) { await accountAbility.queryOsAccountDistributedInfo(obj).then(function (data) {
console.debug("====>account_updateOsAccountDistributedInfo_test003 data:" + JSON.stringify(data)) console.debug("====>account_updateOsAccountDistributedInfo_test003 data:" + JSON.stringify(data))
expect(data.name).assertEqual("ohosAnonymousName") expect(data.name).assertEqual("ohosAnonymousName")
done(); done();
...@@ -265,7 +262,7 @@ export default function AccountTest() { ...@@ -265,7 +262,7 @@ export default function AccountTest() {
try { try {
accountAbility.updateOsAccountDistributedInfo(obj, function (err) { accountAbility.updateOsAccountDistributedInfo(obj, function (err) {
console.debug("====>account_updateOsAccountDistributedInfo_test004 update_err:" + JSON.stringify(err)) console.debug("====>account_updateOsAccountDistributedInfo_test004 update_err:" + JSON.stringify(err))
accountAbility.queryOsAccountDistributedInfo(function (err, data) { accountAbility.queryOsAccountDistributedInfo(async function (err, data) {
console.debug("====>account_updateOsAccountDistributedInfo_test004 query_err:" + JSON.stringify(err)) console.debug("====>account_updateOsAccountDistributedInfo_test004 query_err:" + JSON.stringify(err))
console.debug("====>account_updateOsAccountDistributedInfo_test004 query_data:" + JSON.stringify(data)) console.debug("====>account_updateOsAccountDistributedInfo_test004 query_data:" + JSON.stringify(data))
expect(data.name).assertEqual('ZhangSan') expect(data.name).assertEqual('ZhangSan')
...@@ -275,7 +272,7 @@ export default function AccountTest() { ...@@ -275,7 +272,7 @@ export default function AccountTest() {
name: 'ZhangSan', name: 'ZhangSan',
event: 'Ohos.account.event.LOGOFF' event: 'Ohos.account.event.LOGOFF'
}; };
accountAbility.updateOsAccountDistributedInfo(obj).then(function (err) { await accountAbility.updateOsAccountDistributedInfo(obj).then(function (err) {
expect(err).assertEqual(undefined) expect(err).assertEqual(undefined)
done(); done();
}); });
...@@ -307,7 +304,7 @@ export default function AccountTest() { ...@@ -307,7 +304,7 @@ export default function AccountTest() {
}; };
try { try {
await accountAbility.updateOsAccountDistributedInfo(obj).then(function () { await accountAbility.updateOsAccountDistributedInfo(obj).then(function () {
accountAbility.queryOsAccountDistributedInfo(function (err, data) { accountAbility.queryOsAccountDistributedInfo(async function (err, data) {
console.debug('====>account_updateOsAccountDistributedInfo_test005 data:' + JSON.stringify(data)) console.debug('====>account_updateOsAccountDistributedInfo_test005 data:' + JSON.stringify(data))
expect(data.name).assertEqual('ZhangSan') expect(data.name).assertEqual('ZhangSan')
expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5')
...@@ -320,7 +317,7 @@ export default function AccountTest() { ...@@ -320,7 +317,7 @@ export default function AccountTest() {
avatar:undefined, avatar:undefined,
status:undefined status:undefined
}; };
accountAbility.updateOsAccountDistributedInfo(obj).then(function (err) { await accountAbility.updateOsAccountDistributedInfo(obj).then(function (err) {
expect(err).assertEqual(undefined) expect(err).assertEqual(undefined)
done() done()
}); });
...@@ -352,7 +349,7 @@ export default function AccountTest() { ...@@ -352,7 +349,7 @@ export default function AccountTest() {
}; };
try { try {
accountAbility.updateOsAccountDistributedInfo(obj, function () { accountAbility.updateOsAccountDistributedInfo(obj, function () {
accountAbility.queryOsAccountDistributedInfo(function (err, data) { accountAbility.queryOsAccountDistributedInfo(async function (err, data) {
console.debug("====>account_updateOsAccountDistributedInfo_test006 data:" + JSON.stringify(data)) console.debug("====>account_updateOsAccountDistributedInfo_test006 data:" + JSON.stringify(data))
expect(data.name).assertEqual('ZhangSan') expect(data.name).assertEqual('ZhangSan')
expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5')
...@@ -361,7 +358,7 @@ export default function AccountTest() { ...@@ -361,7 +358,7 @@ export default function AccountTest() {
name: 'ZhangSan', name: 'ZhangSan',
event: 'Ohos.account.event.LOGOUT' event: 'Ohos.account.event.LOGOUT'
}; };
accountAbility.updateOsAccountDistributedInfo(obj).then(function (data) { await accountAbility.updateOsAccountDistributedInfo(obj).then(function (data) {
expect(data).assertEqual(undefined) expect(data).assertEqual(undefined)
done(); done();
}); });
...@@ -393,7 +390,7 @@ export default function AccountTest() { ...@@ -393,7 +390,7 @@ export default function AccountTest() {
}; };
try { try {
await accountAbility.updateOsAccountDistributedInfo(obj).then(function () { await accountAbility.updateOsAccountDistributedInfo(obj).then(function () {
accountAbility.queryOsAccountDistributedInfo(function (err, data) { accountAbility.queryOsAccountDistributedInfo(async function (err, data) {
console.debug('====>account_updateOsAccountDistributedInfo_test007 data:' + JSON.stringify(data)) console.debug('====>account_updateOsAccountDistributedInfo_test007 data:' + JSON.stringify(data))
expect(data.name).assertEqual('ZhangSan') expect(data.name).assertEqual('ZhangSan')
expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5')
...@@ -402,7 +399,7 @@ export default function AccountTest() { ...@@ -402,7 +399,7 @@ export default function AccountTest() {
name: 'ZhangSan', name: 'ZhangSan',
event: 'Ohos.account.event.LOGOUT' event: 'Ohos.account.event.LOGOUT'
}; };
accountAbility.updateOsAccountDistributedInfo(obj).then(function (err) { await accountAbility.updateOsAccountDistributedInfo(obj).then(function (err) {
expect(err).assertEqual(undefined) expect(err).assertEqual(undefined)
done() done()
}); });
...@@ -434,7 +431,7 @@ export default function AccountTest() { ...@@ -434,7 +431,7 @@ export default function AccountTest() {
}; };
try { try {
accountAbility.updateOsAccountDistributedInfo(obj, function () { accountAbility.updateOsAccountDistributedInfo(obj, function () {
accountAbility.queryOsAccountDistributedInfo(function (err, data) { accountAbility.queryOsAccountDistributedInfo(async function (err, data) {
console.debug("====>account_updateOsAccountDistributedInfo_test008 data:" + JSON.stringify(data)) console.debug("====>account_updateOsAccountDistributedInfo_test008 data:" + JSON.stringify(data))
expect(data.name).assertEqual('ZhangSan') expect(data.name).assertEqual('ZhangSan')
expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5')
...@@ -443,7 +440,7 @@ export default function AccountTest() { ...@@ -443,7 +440,7 @@ export default function AccountTest() {
name: 'ZhangSan', name: 'ZhangSan',
event: 'Ohos.account.event.LOGOUT' event: 'Ohos.account.event.LOGOUT'
}; };
accountAbility.updateOsAccountDistributedInfo(obj).then(function (data) { await accountAbility.updateOsAccountDistributedInfo(obj).then(function (data) {
expect(data).assertEqual(undefined) expect(data).assertEqual(undefined)
done(); done();
}); });
...@@ -471,7 +468,7 @@ export default function AccountTest() { ...@@ -471,7 +468,7 @@ export default function AccountTest() {
}; };
try { try {
await accountAbility.updateOsAccountDistributedInfo(obj).then(function () { await accountAbility.updateOsAccountDistributedInfo(obj).then(function () {
accountAbility.queryOsAccountDistributedInfo(function (err, data) { accountAbility.queryOsAccountDistributedInfo(async function (err, data) {
console.debug('====>account_updateOsAccountDistributedInfo_test009 data:' + JSON.stringify(data)) console.debug('====>account_updateOsAccountDistributedInfo_test009 data:' + JSON.stringify(data))
expect(data.name).assertEqual('ZhangSan') expect(data.name).assertEqual('ZhangSan')
expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5')
...@@ -480,7 +477,7 @@ export default function AccountTest() { ...@@ -480,7 +477,7 @@ export default function AccountTest() {
name: 'ZhangSan', name: 'ZhangSan',
event: 'Ohos.account.event.LOGOUT' event: 'Ohos.account.event.LOGOUT'
}; };
accountAbility.updateOsAccountDistributedInfo(obj).then(function (err) { await accountAbility.updateOsAccountDistributedInfo(obj).then(function (err) {
expect(err).assertEqual(undefined) expect(err).assertEqual(undefined)
done() done()
}); });
...@@ -508,7 +505,7 @@ export default function AccountTest() { ...@@ -508,7 +505,7 @@ export default function AccountTest() {
}; };
try { try {
accountAbility.updateOsAccountDistributedInfo(obj, function () { accountAbility.updateOsAccountDistributedInfo(obj, function () {
accountAbility.queryOsAccountDistributedInfo(function (err, data) { accountAbility.queryOsAccountDistributedInfo(async function (err, data) {
console.debug("====>account_updateOsAccountDistributedInfo_test010 data:" + JSON.stringify(data)) console.debug("====>account_updateOsAccountDistributedInfo_test010 data:" + JSON.stringify(data))
expect(data.name).assertEqual('ZhangSan') expect(data.name).assertEqual('ZhangSan')
expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5') expect(data.id).assertEqual('5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5')
...@@ -517,7 +514,7 @@ export default function AccountTest() { ...@@ -517,7 +514,7 @@ export default function AccountTest() {
name: 'ZhangSan', name: 'ZhangSan',
event: 'Ohos.account.event.LOGOUT' event: 'Ohos.account.event.LOGOUT'
}; };
accountAbility.updateOsAccountDistributedInfo(obj).then(function (data) { await accountAbility.updateOsAccountDistributedInfo(obj).then(function (data) {
expect(data).assertEqual(undefined) expect(data).assertEqual(undefined)
done(); done();
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册