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

[Upgrade Assistant] Fixes to Upgrade Assistant Tests and Page Objects To Stop CI Failures #89942

Merged
merged 5 commits into from
Feb 3, 2021

Conversation

cuff-links
Copy link
Contributor

Closes #52360
Closes #52465

Summary

This PR addresses issues that could be contributing to the intermittent failing of Upgrade Assistant functional tests.

As part of this PR we:

  • Several explicit waits were removed.
  • Replaced retry.try calls for retry.waitFor() when we had a concrete condition to wait for.
  • Extracted out expected() calls to test files which is in line with the rest of our tests.
  • Changed functions within the Upgrade Assistant page object to be actions and properties which is in line with our other tests.

…o CI failures. Expect functions should be in the test file itself so I changed the page objects for page actions and extracted out the expect calls to the test files.
@cuff-links cuff-links added test_xpack_functional v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes Feature:Upgrade Assistant labels Feb 1, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@cuff-links
Copy link
Contributor Author

@elasticmachine merge upstream

… pass on the first attempt. Simplified the toggle function to just click the toggle.
@cuff-links
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @cuff-links! Changes LGTM. I ran once locally and all tests passed.

Were you planning on running this multiple times in CI to confirm it addresses the flakiness?

@cuff-links
Copy link
Contributor Author

Thanks for working on this @cuff-links! Changes LGTM. I ran once locally and all tests passed.

Were you planning on running this multiple times in CI to confirm it addresses the flakiness?

Yep. In the process of setting that up.

@cuff-links
Copy link
Contributor Author

jenkins test this

@cuff-links
Copy link
Contributor Author

@elasticmachine Merge upstream

@cuff-links
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@cuff-links
Copy link
Contributor Author

@cuff-links cuff-links merged commit 14cf187 into elastic:master Feb 3, 2021
@cuff-links cuff-links deleted the Upgrade_Assistant_Test_Fix branch February 3, 2021 08:38
cuff-links pushed a commit to cuff-links/kibana that referenced this pull request Feb 5, 2021
… To Stop CI Failures (elastic#89942)

* Updated test to use no hard coded waits which could be contributing to CI failures. Expect functions should be in the test file itself so I changed the page objects for page actions and extracted out the expect calls to the test files.

* Added retry within the test file to retry the assertion if it doesn't pass on the first attempt. Simplified the toggle function to just click the toggle.

* Fixed type check issue.

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	x-pack/test/functional/apps/upgrade_assistant/upgrade_assistant.ts
cuff-links pushed a commit that referenced this pull request Feb 5, 2021
…bjects To Stop CI Failures (#89942) (#90387)

* [Upgrade Assistant] Fixes to Upgrade Assistant Tests and Page Objects To Stop CI Failures (#89942)

* Updated test to use no hard coded waits which could be contributing to CI failures. Expect functions should be in the test file itself so I changed the page objects for page actions and extracted out the expect calls to the test files.

* Added retry within the test file to retry the assertion if it doesn't pass on the first attempt. Simplified the toggle function to just click the toggle.

* Fixed type check issue.

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	x-pack/test/functional/apps/upgrade_assistant/upgrade_assistant.ts

* Removed an unused reference to security.
expect(summaryElText).to.eql(summary);
async waitForTelemetryHidden() {
const self = this;
retry.waitFor('Telemetry to disappear.', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm seeing failures like https://kibana-ci.elastic.co/job/elastic+kibana+pipeline-pull-request/104171/execution/node/796/log/

What seems to happen is that tests pass and complete, so the test runner kills the kibana process. However webdriver is still stuck in this waitFor and so exits with a non-zero code.

I suspect we need to insert an await here await retry.waitFor('... so that we don't end the test and kill Kibana before webdriver is done.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Upgrade Assistant release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more test_xpack_functional v7.12.0 v8.0.0
Projects
None yet
6 participants