Skip to content

Commit

Permalink
Fix flakiness in test
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote committed Mar 18, 2020
1 parent f95aa73 commit 413b6d2
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,17 @@ instanceStateValue: true
const testStart = new Date();
// create an alert
const reference = alertUtils.generateReference();
const overwrites = {
throttle: '1s',
schedule: { interval: '1s' },
};
const response = await alertUtils.createAlwaysFiringAction({ reference, overwrites });
const response = await alertUtils.createAlwaysFiringAction({
reference,
overwrites: { throttle: null },
});

// only need to test creation success paths
if (response.statusCode !== 200) return;

// Avoid invalidating an API key while the alert is executing
await taskManagerUtils.waitForAllTasksIdle(testStart);

// update the alert with super user
const alertId = response.body.id;
const reference2 = alertUtils.generateReference();
Expand All @@ -189,8 +191,6 @@ instanceStateValue: true
overwrites: {
name: 'def',
tags: ['fee', 'fi', 'fo'],
throttle: '1s',
schedule: { interval: '1s' },
},
});

Expand Down

0 comments on commit 413b6d2

Please sign in to comment.