-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[ML] Single metric viewer functional test: add retry to reduce flakiness #188686
[ML] Single metric viewer functional test: add retry to reduce flakiness #188686
Conversation
Pinging @elastic/ml-ui (:ml) |
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#6581[❌] x-pack/test/functional/apps/ml/anomaly_detection_integrations/config.ts: 9/35 tests passed. |
77cb5ae
to
07bc19d
Compare
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#6586[❌] x-pack/test/functional/apps/ml/anomaly_detection_integrations/config.ts: 9/35 tests passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -92,7 +92,7 @@ export function MachineLearningSingleMetricViewerProvider( | |||
}, | |||
|
|||
async ensureAnomalyActionDiscoverButtonClicked() { | |||
await retry.tryForTime(3 * 1000, async () => { | |||
await retry.tryForTime(10 * 1500, async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick nit on the format: we tend to only change the first factor and leave the * 1000
so it's easier to see at glance how many seconds this timeout is.
@@ -92,7 +92,7 @@ export function MachineLearningSingleMetricViewerProvider( | |||
}, | |||
|
|||
async ensureAnomalyActionDiscoverButtonClicked() { | |||
await retry.tryForTime(3 * 1000, async () => { | |||
await retry.tryForTime(10 * 1500, async () => { | |||
await testSubjects.click('mlAnomaliesListRowAction_viewInDiscoverButton'); | |||
await testSubjects.existOrFail('discoverLayoutResizableContainer'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the failure screenshot it looks like the click didn't have an effect (might have been triggered too early) and the click should be retried. However looking into the test log, I can see that this existOrFail
times out after 120 seconds and since the wrapping retry is on a shorter time out, it leaves the retry immediately and never actually triggers the click again.
I'd propose to give the existOrFail
an explicit timeout (as much as we think makes sense for going to the dashboard page, e.g. 10 seconds) and then extend the wrapping retry so it actually gives it a few tries, something like this:
async ensureAnomalyActionDiscoverButtonClicked() {
await retry.tryForTime(30 * 1000, async () => {
await testSubjects.click('mlAnomaliesListRowAction_viewInDiscoverButton');
await testSubjects.existOrFail('discoverLayoutResizableContainer', { timeout: 10 * 1000 });
});
},
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#6593[✅] x-pack/test/functional/apps/ml/anomaly_detection_integrations/config.ts: 30/30 tests passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest changes LGTM
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]
History
|
Summary
Fixes #188493
This PR unskips the single metric viewer functional test that is failing (confirmed functionality is working as expected) and increases the retries to reduce flakiness.
Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6593
Checklist
Delete any items that are not applicable to this PR.