提交 64eff87c 编写于 作者: S smartltt

fixed d3dd1dcb from https://gitee.com/smartltt/xts_acts/pulls/8702

master acts延迟用例可选参数用例适配
Signed-off-by: Nsmartltt <litingting86@huawei.com>
Change-Id: If039976e1aac5b3b6d0520ab35de369fd5db2762
上级 4686f719
...@@ -227,10 +227,10 @@ describe("WorkSchedulerJsTest", function () { ...@@ -227,10 +227,10 @@ describe("WorkSchedulerJsTest", function () {
try { try {
workScheduler.startWork(workInfo); workScheduler.startWork(workInfo);
workScheduler.stopWork(workInfo, 111); workScheduler.stopWork(workInfo, 111);
} catch ( err) { expect(workScheduler.stopWork(workInfo, 111)).assertNull();
console.info("---------------- err: " + err.code);
expect( err.code).assertEqual("401");
done(); done();
} catch ( err) {
console.info("WorkSchedulerJsTest007 ---------------- err: " + err.code);
}; };
}) })
......
...@@ -1297,10 +1297,10 @@ export default function WorkSchedulerMgrApiTest() { ...@@ -1297,10 +1297,10 @@ export default function WorkSchedulerMgrApiTest() {
try { try {
workScheduler.startWork(workInfo); workScheduler.startWork(workInfo);
workScheduler.stopWork(workInfo, "true"); workScheduler.stopWork(workInfo, "true");
} catch (error) { expect(workScheduler.stopWork(workInfo, "true")).assertNull();
console.info("----------------error: " + error.code);
expect(error.code).assertEqual("401");
done(); done();
} catch (error) {
console.info("testStopWorkFun001 ----------------error: " + error.code);
} }
}) })
...@@ -1320,11 +1320,11 @@ export default function WorkSchedulerMgrApiTest() { ...@@ -1320,11 +1320,11 @@ export default function WorkSchedulerMgrApiTest() {
}; };
try { try {
workScheduler.startWork(workInfo); workScheduler.startWork(workInfo);
workScheduler.stopWork(workInfo, 111); workScheduler.stopWork(workInfo, undefined);
} catch (error) { expect(workScheduler.stopWork(workInfo, undefined)).assertNull();
console.info("----------------error: " + error.code);
expect(error.code).assertEqual("401");
done(); done();
} catch (error) {
console.info("testStopWorkFun002 ----------------error: " + error.code);
}; };
}) })
...@@ -1345,10 +1345,10 @@ export default function WorkSchedulerMgrApiTest() { ...@@ -1345,10 +1345,10 @@ export default function WorkSchedulerMgrApiTest() {
try { try {
workScheduler.startWork(workInfo); workScheduler.startWork(workInfo);
workScheduler.stopWork(workInfo, null); workScheduler.stopWork(workInfo, null);
} catch (error) { expect(workScheduler.stopWork(workInfo, null)).assertNull();
console.info("----------------error: " + error.code);
expect(error.code).assertEqual("401");
done(); done();
} catch (error) {
console.info("testStopWorkFun003 ----------------error: " + error.code);
} }
}) })
...@@ -1369,10 +1369,10 @@ export default function WorkSchedulerMgrApiTest() { ...@@ -1369,10 +1369,10 @@ export default function WorkSchedulerMgrApiTest() {
try { try {
workScheduler.startWork(workInfo); workScheduler.startWork(workInfo);
workScheduler.stopWork(workInfo); workScheduler.stopWork(workInfo);
} catch (error) { expect(workScheduler.stopWork(workInfo)).assertNull();
console.info("----------------error: " + error.code);
expect(error.code).assertEqual("401");
done(); done();
} catch (error) {
console.info("testStopWorkFun004 ----------------error: " + error.code);
} }
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册