diff --git a/resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/ReminderAgentJs.test.js b/resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/ReminderAgentJs.test.js index 6025bb74eee3ccd86d2b5e7b5650e8eec27a8b1c..6ef45e062f6bed1c502dcdf4774e9d4d4484de83 100644 --- a/resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/ReminderAgentJs.test.js +++ b/resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/ReminderAgentJs.test.js @@ -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(); + }; + } }) /**