-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Functional] Fixes flakiness on TSVB indexpattern switch #78754
[Functional] Fixes flakiness on TSVB indexpattern switch #78754
Conversation
Pinging @elastic/kibana-test-triage (failed-test) |
Pinging @elastic/kibana-app (Team:KibanaApp) |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
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.
Thank you for not giving up on this test, it's been flaky since its creation (well, TSVB reliability is responsible for it as well)
LGTM
await retry.waitFor('combobox options loaded', async () => { | ||
const options = await comboBox.getOptions('metricsIndexPatternFieldsSelect'); | ||
log.debug(`-- optionsCount=${options.length}`); | ||
return options.length > 0; | ||
}); | ||
} |
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.
Do you think we need a retry here? I wonder if there is a chance that option list will be updated without field value being re-typed?
Looks like openOptionsList
is not reopening list, if it is already displayed.
It's not critical if it works stable, just want to point out that using nested retries might slow things down.
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.
Yes I think it is as await comboBox.getOptions('metricsIndexPatternFieldsSelect');
can return 0. The problem is that the metricsIndexPatternFieldsSelect
dropdown has a delay on filling in with the options so here the retry helps to get the options and when there are > 0 it will continue to the rest of the test
…n switch (elastic#78754) Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Closes #76190
Closes #71979
This functional test fails a lot both on cloud and on regular test runners. The problem is that while it adds the new index pattern the time fields need some time to be loaded so it falls on a race condition as it tries to click on a time option that hasn't been loaded yet.
I have changed the implementation by instead of waiting 3sec (which is a magic number), it waits for the options on the timefield dropdown to be loaded. When there are options it selects the timestamp. I have run it on normal test runner 100 times and 15 times on cloud. It seems that it doesn't fail.
https://kibana-ci.elastic.co/job/kibana+flaky-test-suite-runner/858/
https://kibana-ci.elastic.co/job/kibana+flaky-test-suite-runner/865/
https://internal-ci.elastic.co/job/elastic+estf-cloud-kibana-flaky-test-runner/137/
https://internal-ci.elastic.co/job/elastic+estf-cloud-kibana-flaky-test-runner/144/
https://internal-ci.elastic.co/job/elastic+estf-cloud-kibana-flaky-test-runner/145/