提交 25267804 编写于 作者: J jiyong

jiyong@huawei.com

Signed-off-by: Njiyong <jiyong@huawei.com>
上级 a296c416
...@@ -110,16 +110,21 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -110,16 +110,21 @@ describe('ActsAmsCallBackFifthScene', function () {
}, },
}, },
); );
done(); setTimeout(done(), 5000);
}); });
function timeout() {
expect().assertFail();
console.debug('Acts_Ams_test=========timeout========');
done();
}
/* /*
* @tc.number : Acts_Ams_test_6600 * @tc.number : Acts_Ams_test_6600
* @tc.name : getAllRunningProcesses : Get All Running Processes Info * @tc.name : getAllRunningProcesses : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by CallBack) * @tc.desc : Get All Running Processes Info(by CallBack)
*/ */
it('Acts_Ams_test_6600', 0, async function (done) { it('Acts_Ams_test_6600', 0, async function (done) {
setTimeout(function () {
abilitymanager.getAllRunningProcesses( abilitymanager.getAllRunningProcesses(
(error, info) => { (error, info) => {
console.info('getAllRunningProcesses error.code \ console.info('getAllRunningProcesses error.code \
...@@ -150,9 +155,9 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -150,9 +155,9 @@ describe('ActsAmsCallBackFifthScene', function () {
expect(typeof (info[i].weightReasonCode)).assertEqual("number"); expect(typeof (info[i].weightReasonCode)).assertEqual("number");
expect(info[i].weightReasonCode).assertEqual(WeightReasonCode.REASON_UNKNOWN); expect(info[i].weightReasonCode).assertEqual(WeightReasonCode.REASON_UNKNOWN);
} }
});
done(); done();
}, 5000); });
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -197,8 +202,9 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -197,8 +202,9 @@ describe('ActsAmsCallBackFifthScene', function () {
expect(typeof (data[i].missionDescription.label)).assertEqual("string"); expect(typeof (data[i].missionDescription.label)).assertEqual("string");
expect(typeof (data[i].missionDescription.iconPath)).assertEqual("string"); expect(typeof (data[i].missionDescription.iconPath)).assertEqual("string");
} }
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -243,8 +249,9 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -243,8 +249,9 @@ describe('ActsAmsCallBackFifthScene', function () {
expect(typeof (data[i].missionDescription.label)).assertEqual("string"); expect(typeof (data[i].missionDescription.label)).assertEqual("string");
expect(typeof (data[i].missionDescription.iconPath)).assertEqual("string"); expect(typeof (data[i].missionDescription.iconPath)).assertEqual("string");
} }
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -261,8 +268,9 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -261,8 +268,9 @@ describe('ActsAmsCallBackFifthScene', function () {
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
expect(typeof (info)).assertEqual("number"); expect(typeof (info)).assertEqual("number");
expect(info).assertEqual(0); expect(info).assertEqual(0);
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -279,8 +287,9 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -279,8 +287,9 @@ describe('ActsAmsCallBackFifthScene', function () {
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
expect(typeof (info)).assertEqual("number"); expect(typeof (info)).assertEqual("number");
expect(info).assertEqual(0); expect(info).assertEqual(0);
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -297,8 +306,9 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -297,8 +306,9 @@ describe('ActsAmsCallBackFifthScene', function () {
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
expect(typeof (info)).assertEqual("number"); expect(typeof (info)).assertEqual("number");
expect(info).assertLarger(0); expect(info).assertLarger(0);
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -313,8 +323,9 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -313,8 +323,9 @@ describe('ActsAmsCallBackFifthScene', function () {
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
expect(typeof (info)).assertEqual("number"); expect(typeof (info)).assertEqual("number");
expect(info).assertLarger(0); expect(info).assertLarger(0);
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -329,7 +340,8 @@ describe('ActsAmsCallBackFifthScene', function () { ...@@ -329,7 +340,8 @@ describe('ActsAmsCallBackFifthScene', function () {
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
expect(typeof (info)).assertEqual("number"); expect(typeof (info)).assertEqual("number");
expect(info).assertEqual(0); expect(info).assertEqual(0);
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
}) })
...@@ -84,13 +84,18 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -84,13 +84,18 @@ describe('ActsAmsCallBackFirstScene', function () {
done(); done();
}); });
function timeout() {
expect().assertFail();
console.debug('Acts_Ams_test=========timeout========');
done();
}
/* /*
* @tc.number : Acts_Ams_test_0200 * @tc.number : Acts_Ams_test_0200
* @tc.name : getAllRunningProcesses : Get All Running Processes Info * @tc.name : getAllRunningProcesses : Get All Running Processes Info
* @tc.desc : Get All Running Processes Info(by CallBack) * @tc.desc : Get All Running Processes Info(by CallBack)
*/ */
it('Acts_Ams_test_0200', 0, async function (done) { it('Acts_Ams_test_0200', 0, async function (done) {
setTimeout(function () {
abilitymanager.getAllRunningProcesses( abilitymanager.getAllRunningProcesses(
(error, info) => { (error, info) => {
console.info('getAllRunningProcesses error.code \ console.info('getAllRunningProcesses error.code \
...@@ -121,9 +126,9 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -121,9 +126,9 @@ describe('ActsAmsCallBackFirstScene', function () {
expect(typeof (info[i].weightReasonCode)).assertEqual("number"); expect(typeof (info[i].weightReasonCode)).assertEqual("number");
expect(info[i].weightReasonCode).assertEqual(WeightReasonCode.REASON_UNKNOWN); expect(info[i].weightReasonCode).assertEqual(WeightReasonCode.REASON_UNKNOWN);
} }
});
done(); done();
}, 5000); });
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -168,8 +173,9 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -168,8 +173,9 @@ describe('ActsAmsCallBackFirstScene', function () {
expect(typeof (info[i].missionDescription.label)).assertEqual("string"); expect(typeof (info[i].missionDescription.label)).assertEqual("string");
expect(typeof (info[i].missionDescription.iconPath)).assertEqual("string"); expect(typeof (info[i].missionDescription.iconPath)).assertEqual("string");
} }
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -214,8 +220,9 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -214,8 +220,9 @@ describe('ActsAmsCallBackFirstScene', function () {
expect(typeof (info[i].missionDescription.label)).assertEqual("string"); expect(typeof (info[i].missionDescription.label)).assertEqual("string");
expect(typeof (info[i].missionDescription.iconPath)).assertEqual("string"); expect(typeof (info[i].missionDescription.iconPath)).assertEqual("string");
} }
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -231,8 +238,9 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -231,8 +238,9 @@ describe('ActsAmsCallBackFirstScene', function () {
console.info('Acts_Ams_test_0800 removeMission error.code \ console.info('Acts_Ams_test_0800 removeMission error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
expect(info).assertLarger(0); expect(info).assertLarger(0);
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -248,8 +256,9 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -248,8 +256,9 @@ describe('ActsAmsCallBackFirstScene', function () {
console.info('Acts_Ams_test_1200 moveMissionToTop error.code \ console.info('Acts_Ams_test_1200 moveMissionToTop error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
expect(info).assertEqual(0); expect(info).assertEqual(0);
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -265,8 +274,9 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -265,8 +274,9 @@ describe('ActsAmsCallBackFirstScene', function () {
console.info('Acts_Ams_test_1400 removeMissions error.code \ console.info('Acts_Ams_test_1400 removeMissions error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
expect(info).assertLarger(0); expect(info).assertLarger(0);
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -280,8 +290,9 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -280,8 +290,9 @@ describe('ActsAmsCallBackFirstScene', function () {
console.info('Acts_Ams_test_1000 clearMissions error.code \ console.info('Acts_Ams_test_1000 clearMissions error.code \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
expect(info).assertLarger(0); expect(info).assertLarger(0);
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
/* /*
...@@ -295,8 +306,9 @@ describe('ActsAmsCallBackFirstScene', function () { ...@@ -295,8 +306,9 @@ describe('ActsAmsCallBackFirstScene', function () {
console.info('Acts_Ams_test_1600 killProcessesByBundleName error.code: \ console.info('Acts_Ams_test_1600 killProcessesByBundleName error.code: \
' + error.code + ',data [' + info + ']'); ' + error.code + ',data [' + info + ']');
expect(info).assertEqual(0); expect(info).assertEqual(0);
});
done(); done();
});
setTimeout(timeout, 5000);
}) })
}) })
......
...@@ -16,7 +16,8 @@ ohos_hap("Defpermission") { ...@@ -16,7 +16,8 @@ ohos_hap("Defpermission") {
hap_profile = "./src/main/config.json" hap_profile = "./src/main/config.json"
hap_name = "Defpermission" hap_name = "Defpermission"
subsystem_name = XTS_SUITENAME subsystem_name = XTS_SUITENAME
final_hap_path = "${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap" final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true testonly = true
deps = [ deps = [
":hjs_demo_js_assets", ":hjs_demo_js_assets",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册