未验证 提交 566c4af9 编写于 作者: O openharmony_ci 提交者: Gitee

!8338 【account】【3.2Release】用例时序问题

Merge pull request !8338 from 翟孟超/cherry-pick-1680500317
......@@ -21,8 +21,9 @@ const LENGTHLIMIT = 1024;
const SELFBUNDLE = 'com.example.actsgetaccountsbyowner'
const createAccountOptions = {customData:{age:'12'}}
export default function GetAccountsByOwner() {
describe('GetAccountsByOwner', function () {
beforeAll(async function (done) {
console.debug("====>startAbility first start====");
console.debug("====>startAbility start====");
await featureAbility.startAbility(
{
want:
......@@ -36,11 +37,10 @@ export default function GetAccountsByOwner() {
},
},
);
sleep(TIMEOUT);
await sleep(TIMEOUT);
done();
});
describe('GetAccountsByOwner', function () {
async function sleep(delay) {
let timeoutId = null;
var promise = new Promise((resolve, reject) => {
......@@ -315,7 +315,7 @@ export default function GetAccountsByOwner() {
console.debug("====>creat finish====");
console.debug("====>add account 1000 start====");
await appAccountManager.createAccount("Account_application_promise");
sleep(TIMEOUT)
await sleep(TIMEOUT)
console.debug("====>getAccountsByOwner 1000 start====");
try{
var data = await appAccountManager.getAccountsByOwner(SELFBUNDLE);
......@@ -361,7 +361,7 @@ export default function GetAccountsByOwner() {
console.debug("====>GetAccountsByOwner_1100 end====");
done();
}
sleep(TIMEOUT)
await sleep(TIMEOUT)
console.debug("====>getAccountsByOwner 1100 start====");
appAccountManager.getAccountsByOwner(specifiedBundle, getAllCallback);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册