Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes flaky test in Alert Details page #57490

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,13 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
})
)
.forEach(alertInstanceDuration => {
// make sure the duration is within a 2 second range
// make sure the duration is within a 10 second range which is
// good enough as the alert interval is 1m, so we know it is a fresh value
expect(alertInstanceDuration.as('milliseconds')).to.greaterThan(
durationFromInstanceTillPageLoad.subtract(1000 * 2).as('milliseconds')
durationFromInstanceTillPageLoad.subtract(1000 * 10).as('milliseconds')
);
expect(alertInstanceDuration.as('milliseconds')).to.lessThan(
durationFromInstanceTillPageLoad.add(1000 * 2).as('milliseconds')
durationFromInstanceTillPageLoad.add(1000 * 10).as('milliseconds')
);
});
});
Expand Down