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

[Discover] Improve histogram functional tests #174038

Merged
merged 8 commits into from
Dec 29, 2023

Conversation

kertal
Copy link
Member

@kertal kertal commented Dec 28, 2023

Summary

Improving Discover histogram tests to fix occasional flakiness due to a redundant time range UI interaction

Fixes #170091
Fixes #173904

Flaky test runner

50x (stateful worked, serverless failed) https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4703
50x (all tests serverless worked) https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4705

Checklist

@kertal kertal added Feature:Discover Discover Application Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. release_note:skip Skip the PR/issue when compiling release notes labels Dec 28, 2023
@kertal kertal self-assigned this Dec 28, 2023
@kertal
Copy link
Member Author

kertal commented Dec 28, 2023

/ci

@kertal
Copy link
Member Author

kertal commented Dec 28, 2023

/ci

Comment on lines -73 to -74
await PageObjects.timePicker.setDefaultAbsoluteRange();
await PageObjects.discover.waitUntilSearchingHasFinished();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's an occasional error that setting the timerange here again leads to a double submit. then the test is failing:

debg Find.allByCssSelector('.echChart') with timeout=10000
[00:04:39]         │ debg renderings before brushing - actual: 2 expected: 1
[00:04:39]         │ debg Find.allByCssSelector('.echChart') with timeout=10000
[00:04:39]         │ debg renderings before brushing - actual: 2 expected: 1

Since there's no reason the set the time range, just submitting the query should be sufficient for re-rendering the histogram

@@ -43,6 +43,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
);
await security.testUser.setRoles(['kibana_admin', 'long_window_logstash']);
await kibanaServer.uiSettings.replace(defaultSettings);
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
Copy link
Member Author

@kertal kertal Dec 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making the test a bit faster, since setting a different default time range in AdvancedSettings is faster than having to do so in UI

@kertal kertal marked this pull request as ready for review December 28, 2023 21:55
@kertal kertal requested a review from a team as a code owner December 28, 2023 21:55
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me and make sense, and are passing the flaky test runner. Thanks for addressing these troublesome tests!

@kertal kertal added the backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) label Dec 29, 2023
@kertal
Copy link
Member Author

kertal commented Dec 29, 2023

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @kertal

@kertal kertal merged commit 3c0a48c into elastic:main Dec 29, 2023
20 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 29, 2023
Improving Discover histogram tests to fix occasional flakiness due to a redundant time range UI interaction

(cherry picked from commit 3c0a48c)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.12

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 29, 2023
# Backport

This will backport the following commits from `main` to `8.12`:
- [[Discover] Improve histogram functional tests
(#174038)](#174038)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Matthias
Wilhelm","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-12-29T18:08:11Z","message":"[Discover]
Improve histogram functional tests (#174038)\n\nImproving Discover
histogram tests to fix occasional flakiness due to a redundant time
range UI
interaction","sha":"3c0a48c86f927fb4998b734b7134203b8fd93090","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Discover","release_note:skip","Team:DataDiscovery","backport:prev-minor","v8.13.0"],"title":"[Discover]
Improve histogram functional
tests","number":174038,"url":"https://github.com/elastic/kibana/pull/174038","mergeCommit":{"message":"[Discover]
Improve histogram functional tests (#174038)\n\nImproving Discover
histogram tests to fix occasional flakiness due to a redundant time
range UI
interaction","sha":"3c0a48c86f927fb4998b734b7134203b8fd93090"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/174038","number":174038,"mergeCommit":{"message":"[Discover]
Improve histogram functional tests (#174038)\n\nImproving Discover
histogram tests to fix occasional flakiness due to a redundant time
range UI
interaction","sha":"3c0a48c86f927fb4998b734b7134203b8fd93090"}}]}]
BACKPORT-->

Co-authored-by: Matthias Wilhelm <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v8.12.0 v8.13.0
Projects
None yet
5 participants