From bf894f6c529d8c87ee26578aebd8c9a9dce025a4 Mon Sep 17 00:00:00 2001 From: Gidi Meir Morris Date: Thu, 13 Feb 2020 09:58:16 +1300 Subject: [PATCH] fixed flaky test (#57490) --- .../apps/triggers_actions_ui/details.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts index 938b98591b6a2..ce9160abdb086 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/details.ts @@ -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') ); }); });