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

!8432 【resourceschedule_standard】【3.2release分支】3.2release api提醒代理模块接口优化

Merge pull request !8432 from smartltt/cherry-pick-1681299252
......@@ -2799,26 +2799,21 @@ export default function ReminderAgentTest() {
let maxLimitNumsOfApp = 30;
let firstId = 0;
let secondId = 0;
let diffId = 0
reminderAgent.cancelAllReminders().then(() =>{
for (let i = 0; i < maxLimitNumsOfApp; i++) {
(function (i) {
setTimeout(function () {
reminderAgent.publishReminder(timer).then((reminderId) => {
if (i === 0) {
firstId = reminderId
}
if (i === 29) {
secondId = reminderId
diffId = secondId - firstId
expect(29).assertEqual(diffId);
done();
}
});
}, 500);
})(i);
}
})
let diffId = 0;
let remiderId;
await reminderAgent.cancelAllReminders();
for (let i = 0; i < maxLimitNumsOfApp; i++) {
remiderId = await reminderAgent.publishReminder(timer);
if (i === 0) {
firstId = reminderId
}
if (i === 29) {
secondId = reminderId
diffId = secondId - firstId
expect(29).assertEqual(diffId);
done();
};
}
})
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册