Skip to content

Commit

Permalink
chore: try to fix alerting test
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Sep 9, 2024
1 parent a194a73 commit b684508
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/api/map/alerts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ describe('map:alerts', () => {
.timeout(60000)

it('creates weather active alert at specific location', async () => {
// Wait long enough to be sure the distribution is effective
await utility.promisify(setTimeout)(10000)
const now = moment.utc()
alertObject = await alertService.create({
cron: '*/5 * * * * *',
Expand Down Expand Up @@ -196,7 +198,7 @@ describe('map:alerts', () => {
expect(results[0].status.checkedAt.isSameOrAfter(results[0].status.triggeredAt.format())).beTrue()
})
// Let enough time to process
.timeout(15000)
.timeout(30000)

it('removes active weather alert at specific location', async () => {
await alertService.remove(alertObject._id.toString())
Expand Down

0 comments on commit b684508

Please sign in to comment.