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

【resourceschedule】【master】reminderagent module:modify problem cases

Signed-off-by: Nnan-xiansen <nanjinbin@huawei.com>
Change-Id: Id6351d14276ff04fd10a857084a0ceafbb5b3f6e
上级 27b4ce88
......@@ -2851,11 +2851,14 @@ describe('ReminderAgentTest', function () {
type: 1
}
reminderAgent.addNotificationSlot(tarRemoveSlot.type, (err, data) => {
reminderAgent.removeNotificationSlot(tarRemoveSlot.type, (err, data) => {
expect(0).assertEqual(err.code);
});
console.info('addNotificationSlot 106 err code:'+err.code)
});
reminderAgent.removeNotificationSlot(tarRemoveSlot.type, (err, data) => {
console.info('err code 106 is :' + err.code)
expect(err.code).assertEqual(67108888);
done();
});
done();
})
/**
......@@ -2866,14 +2869,16 @@ describe('ReminderAgentTest', function () {
it('testRemoveNotificationSlotNorFun_0107', 0, async function (done) {
console.info('----------------------testRemoveNotificationSlotNorFun_0107---------------------------');
let tarRemoveSlot = {
type: 1
type: 2
}
reminderAgent.addNotificationSlot(tarRemoveSlot.type, (err, data) => {
console.info('addNotificationSlot err code is :' + err.code)
reminderAgent.removeNotificationSlot(tarRemoveSlot.type).then(() => {
expect(0).assertEqual(err.code);
console.info('err code 107 is :' + err.code)
expect(err.code).assertEqual(401);
done();
});
});
done();
})
/**
......@@ -2888,12 +2893,11 @@ describe('ReminderAgentTest', function () {
triggerTimeInSeconds: 3
}
reminderAgent.publishReminder(timer).then((reminderId) => { });
setTimeout(() => {
reminderAgent.getValidReminders().then((reminders) => {
expect(0).assertEqual(reminders.length);
console.info('reminders length is :' + reminders.length)
expect(reminders.length).assertLarger(0)
done()
});
}, 5000);
done();
})
/**
......@@ -2907,13 +2911,14 @@ describe('ReminderAgentTest', function () {
reminderType: reminderAgent.ReminderType.REMINDER_TYPE_TIMER,
triggerTimeInSeconds: 3
}
reminderAgent.cancelAllReminders().than(() => {})
reminderAgent.publishReminder(timer).then((reminderId) => { });
setTimeout(() => {
reminderAgent.getValidReminders((err, reminders) => {
expect(0).assertEqual(reminders.length);
console.info('reminder length 109 is :' + reminders.length)
expect(reminders.length).assertEqual(0);
done()
});
}, 5000);
done();
})
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册