提交 a649c805 编写于 作者: N nan-xiansen

【全局资源调度子系统】【mater】修复提醒代理失败用例

Signed-off-by: Nnan-xiansen <nanjinbin@huawei.com>
Change-Id: I27fd4c358a46e7a0660b70d6b4aa0d3e8e69ad18
上级 6b9d3a9b
......@@ -128,21 +128,22 @@ describe('ReminderAgentTest', function () {
*/
it('testAddNotificationSlotNorFun002', 0, async function (done) {
let mySlot = null;
let promise = new Promise((resolve, reject) => {
reminderAgent.addNotificationSlot(mySlot).then(() => {
resolve();
}).catch(function (err) {
reject(new Error('errr occurred.'));
console.info('error: ' + err.code);
try {
reminderAgent.addNotificationSlot(mySlot,function(err) {
if(err == undefined) {
console.info('testAddNotificationSlotNorFun002 execute success');
} else {
console.info('testAddNotificationSlotNorFun002 execute failed');
}
);
promise.then(() => {
}, err => {
}).catch(function(err) {
console.info("testAddNotificationSlotNorFun002 execute catch" + err.code);
})
} catch(error) {
console.info("testAddNotificationSlotNorFun002 execute try - catch" + error.code);
let i = 0;
expect(0).assertEqual(i);
}).catch(res => { });
done();
})
}})
/**
* @tc.number SUB_RESOURCESCHEDULE_REMINDER_AGENT_005
......@@ -630,4 +631,4 @@ describe('ReminderAgentTest', function () {
done();
})
})
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册