未验证 提交 800e2506 编写于 作者: O openharmony_ci 提交者: Gitee

!8089 【resourceschedule_standard】【master】master延迟任务用例修改

Merge pull request !8089 from smartltt/master_0320
......@@ -421,15 +421,13 @@ describe("WorkSchedulerJsTest", function () {
console.info('----------------------WorkSchedulerJsTest014---------------------------');
workScheduler.isLastWorkTimeOut(14, (err, res) =>{
if (err) {
expect(false).assertEqual(true)
console.info('WorkSchedulerJsTest014 isLastWorkTimeOut callback failed, err:' + err.code);
expect(err.code).assertEqual(9700004);
done();
} else {
console.info('WorkSchedulerJsTest014 isLastWorkTimeOut callback success, data is:' + res);
expect(true).assertEqual(true)
}
});
setTimeout(()=>{
done();
}, 500);
})
/*
......@@ -442,14 +440,12 @@ describe("WorkSchedulerJsTest", function () {
workScheduler.isLastWorkTimeOut(15)
.then(res => {
console.info('WorkSchedulerJsTest015 isLastWorkTimeOut promise success, data is:' + res);
expect(true).assertEqual(true)
})
.catch(err => {
expect(false).assertEqual(true)
console.info('WorkSchedulerJsTest015 isLastWorkTimeOut promise failed, err:' + err.code);
expect(err.code).assertEqual(9700004);
done();
});
setTimeout(()=>{
done();
}, 500);
})
/*
......
......@@ -1992,15 +1992,12 @@ export default function WorkSchedulerMgrApiTest() {
workScheduler.isLastWorkTimeOut(-1, (error, res) =>{
if (error) {
console.info('testIsLastWorkTimeOutFun001 isLastWorkTimeOut callback fail, because:' + error.code);
expect(error.code).assertLarger(0)
expect(error.code).assertEqual(9700004);
done();
} else {
console.info('testIsLastWorkTimeOutFun001 isLastWorkTimeOut callback success, data is:' + res);
expect(res).assertInstanceOf('Boolean')
}
});
setTimeout(()=>{
done();
}, 500);
})
/*
......@@ -2013,18 +2010,15 @@ export default function WorkSchedulerMgrApiTest() {
try{
workScheduler.isLastWorkTimeOut('1').then(res => {
console.info('testIsLastWorkTimeOutFun003 isLastWorkTimeOut promise success, data is:' + res);
expect(res).assertInstanceOf('Boolean')
})
.catch(error => {
console.info('testIsLastWorkTimeOutFun003 isLastWorkTimeOut promise fail, because:' + error.code);
expect(error.code).assertLarger(0)
});
}catch(error){
console.info('testIsLastWorkTimeOutFun003 isLastWorkTimeOut promise fail ,' + error);
}
setTimeout(()=>{
expect(error.code).assertEqual('401');
done();
}, 500);
}
})
/*testStartWorkFun020
......@@ -2037,18 +2031,15 @@ export default function WorkSchedulerMgrApiTest() {
try{
workScheduler.isLastWorkTimeOut(null).then(res => {
console.info('testIsLastWorkTimeOutFun004 isLastWorkTimeOut promise success, data is:' + res);
expect(res).assertInstanceOf('Boolean')
})
.catch(error => {
console.info('testIsLastWorkTimeOutFun004 isLastWorkTimeOut promise fail, because:' + error.code);
expect(error.code).assertLarger(0)
});
}catch(error){
console.info('testIsLastWorkTimeOutFun004 isLastWorkTimeOut promise fail ,' + error);
}
setTimeout(()=>{
expect(error.code).assertEqual('401');
done();
}, 500);
}
})
})
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册