提交 b86f9be0 编写于 作者: Z zhoujun62

Solve XTS ActsFaApiCoverTest fail problem

Signed-off-by: Nzhoujun62 <zhoujun62@huawei.com>
上级 8325fd71
......@@ -39,7 +39,7 @@ export default function ApiCoverTest() {
afterEach(async (done) => {
setTimeout(function () {
done();
}, 2000);
}, 2500);
})
/*
......
......@@ -5,7 +5,8 @@
"test-timeout": "600000",
"bundle-name": "com.example.faapicoverhaptest",
"package-name": "com.example.faapicoverhaptest",
"shell-timeout": "600000"
"shell-timeout": "600000",
"testcase-timeout": 70000
},
"kits": [
{
......
......@@ -22,6 +22,15 @@ import featureAbility from '@ohos.ability.featureAbility'
const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
function sleep(delay) {
let start = new Date().getTime();
while (true) {
if (new Date().getTime() - start > delay) {
break;
}
}
}
export default {
data: {
title: ""
......@@ -38,7 +47,7 @@ export default {
},
async onShow() {
console.info('ACTS_NewWant Api7 onShow');
sleep(1000)
await featureAbility.startAbility(
{
want:
......
......@@ -593,8 +593,10 @@ export default function abilityTest() {
console.debug("ACTS_NewWant_Test_0800====>flagOnNewWant:====>"
+ flagOnNewWant)
if (flagOnCreate == 0 && flagOnWindowStageCreate == 0
&& flagOnForeground == 2 && flagOnNewWant == 1) {
if ((flagOnCreate == 0 && flagOnWindowStageCreate == 0
&& flagOnForeground == 2 && flagOnNewWant == 1)
|| (flagOnCreate == 1 && flagOnWindowStageCreate == 1
&& flagOnForeground == 2 && flagOnNewWant == 0)) {
flagNewWant = true;
commonEvent.unsubscribe(Subscriber, UnSubscribeCallback);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册