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

add short sleep before clicking Remove on sample data #71104

Merged
merged 5 commits into from
Jul 15, 2020

Conversation

LeeDr
Copy link

@LeeDr LeeDr commented Jul 8, 2020

Summary

Fixes: #65949

Actually I wouldn't call it a "fix" but more of a work-around. Screenshots from intermittent failures on removing sample data show the "Remove" button as if it had not been clicked but the logs indicate that it found and clicked it.

My theory is that 2 checks have to happen when the sample data page loads, for each set of sample data;

  1. check if it's installed or not
  2. check if the logged in user has the privileges to add or remove the data

I don't know the order that those checks happen in (and maybe other checks) vs when the "Remove" button is rendered, but there could be a small timing window where the button is visible and enabled but actually won't remove the same data.
This PR attempts to test that case by adding about a 1 second sleep (I use 1010ms to make it easier to find something that might be unique in the logs) between the time we find the button is enabled and when we click it.

Alternatively we could change the removeSampleDataSet to retry clicking the button until we find it changed to disabled. But that feels worse to me, as far as masking a potential code bug, then adding a small delay before a single try.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@LeeDr
Copy link
Author

LeeDr commented Jul 8, 2020

@elasticmachine merge upstream

@LeeDr
Copy link
Author

LeeDr commented Jul 8, 2020

The last run failed because I put .only on the async_dashboard test suite for the flaky test runner. It passed 100/100 runs there.

@LeeDr
Copy link
Author

LeeDr commented Jul 14, 2020

@elasticmachine merge upstream

@LeeDr LeeDr added Feature:Functional Testing release_note:skip Skip the PR/issue when compiling release notes REASSIGN from Team:Core UI Deprecated label for old Core UI team test_ui_functional labels Jul 14, 2020
@LeeDr LeeDr marked this pull request as ready for review July 14, 2020 15:50
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core-ui (Team:Core UI)

Copy link
Contributor

@myasonik myasonik left a comment

Choose a reason for hiding this comment

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

LGTM!

It maybe isn't perfect but this seems like a good enough solution to merge

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

@LeeDr LeeDr merged commit 0173ef3 into elastic:master Jul 15, 2020
@LeeDr LeeDr deleted the sleepOnRemovingSampleData branch July 15, 2020 14:35
LeeDr pushed a commit to LeeDr/kibana that referenced this pull request Jul 15, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
LeeDr pushed a commit to LeeDr/kibana that referenced this pull request Jul 15, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 15, 2020
* master:
  [Form lib] Memoize form hook object and fix hook array deps (elastic#71237)
  [uiActions] Support emitting nested triggers and actions (elastic#70602)
  add short sleep before clicking Remove on sample data (elastic#71104)
  Fixed the beta badge layout. (elastic#71835)
  Restores task for downloading Chromium builds (elastic#71749)
  [logging] Format new platform json logging to ECS (elastic#71138)
  add policy details and update SO limit requests (elastic#71789)
  Convert vis_type_vega to Typescript (elastic#68915)
  [ML] Fix UI Actions context menu positioning for the Anomaly Swim Lane (elastic#71839)
LeeDr pushed a commit that referenced this pull request Jul 15, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@LeeDr LeeDr added the v7.10.0 label Jul 15, 2020
LeeDr pushed a commit to LeeDr/kibana that referenced this pull request Jul 15, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
LeeDr pushed a commit that referenced this pull request Jul 15, 2020
…71873)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
LeeDr pushed a commit that referenced this pull request Jul 15, 2020
…71906)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants