Skip to content

Conversation

@walterra
Copy link
Contributor

@walterra walterra commented Aug 10, 2020

Summary

Follow up to #70243 (Upgrade EUI to v26.3.1)

Fix for #74623 (Failing test: X-Pack Jest Tests.x-pack/plugins/ml/public/application/components/field_title_bar - FieldTitleBar tooltip hovering)

The timeout used for checking tooltip state was 250ms, equal to the original timeout used by EUI to show tooltips. Turns out this could result in a flaky test. This PR adjust the test timeout to 300ms now uses jest.useFakeTimers() instead of a hard coded timeout for tooltip tests.

Checklist

For maintainers

@walterra walterra added :ml v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.10.0 v7.9.1 labels Aug 10, 2020
@walterra walterra self-assigned this Aug 10, 2020
@walterra walterra marked this pull request as ready for review August 10, 2020 09:36
@walterra walterra requested review from a team as code owners August 10, 2020 09:36
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@walterra
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

Code LGTM

@walterra
Copy link
Contributor Author

Turns out this was still flaky. I refactored the code to make use of jest.useFakeTimers() so we don't have to rely on a hard coded timeout.

@walterra walterra changed the title Increase tooltip timeout from 250ms to 300ms for tests. Use jest.useFakeTimers instead for hard coded timeout for tooltip tests. Aug 10, 2020
@walterra walterra changed the title Use jest.useFakeTimers instead for hard coded timeout for tooltip tests. Use jest.useFakeTimers instead of hard coded timeout for tooltip tests. Aug 10, 2020
@walterra walterra requested a review from jgowdyelastic August 10, 2020 11:15
Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

Thanks, @walterra!

Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

LGTM

@walterra
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@FrankHassanabad FrankHassanabad 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 fixing the timer cruft in our tests! Appreciate it.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

@walterra walterra merged commit b249af1 into elastic:master Aug 13, 2020
@walterra walterra deleted the ml-fix-flaky-tooltip-timeout-jest-test branch August 13, 2020 07:38
walterra added a commit to walterra/kibana that referenced this pull request Aug 13, 2020
walterra added a commit to walterra/kibana that referenced this pull request Aug 13, 2020
walterra added a commit that referenced this pull request Aug 13, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Aug 13, 2020
* master: (28 commits)
  [Task manager] Prevents edge case where already running tasks are reschedule every polling interval (elastic#74606)
  [Security Solution] Fix the status of timelines' bulk actions (elastic#74560)
  Data plugin: Suggested enhance pattern (elastic#74505)
  Use jest.useFakeTimers instead of hard coded timeout for tooltip tests. (elastic#74642)
  [Security Solution][lists] Adds tests for exception lists and items part 2 (elastic#74815)
  [Security Solution][Resolver] fix presentation role on edgeline (elastic#74869)
  [Security Solution][Detections] Refactor ML calls for newest ML permissions (elastic#74582)
  [bin/kibana-plugin] support KP plugins instead (elastic#74604)
  Reduce number of indexed fields in index pattern saved object (elastic#74817)
  [reporting] Pass along generic parameters in high-order route handler (elastic#74892)
  Migrated last pieces of legacy fixture code (elastic#74470)
  Empty index patterns page re-design  (elastic#68819)
  [babel] coalese some versions to prevent breaking yarn install (elastic#74864)
  [Dashboard First] Decouple Attribute Service and By Value Embeddables (elastic#74302)
  Revert "[reporting] Pass along generic parameters in high-order route handler" (elastic#74891)
  [reporting] Pass along generic parameters in high-order route handler (elastic#74879)
  [src/dev/build] implement a getBuildNumber() mock (elastic#74881)
  [Enterprise Search] Add solution-level side navigation (elastic#74705)
  [DOCS] Canvas docs 7.9 refresh (elastic#74000)
  [Security Solution][Resolver]Enzyme test related events closing (elastic#74811)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Aug 13, 2020
…le-buffer-with-update-of-same-id

* upstream/master: (37 commits)
  [Task manager] Prevents edge case where already running tasks are reschedule every polling interval (elastic#74606)
  [Security Solution] Fix the status of timelines' bulk actions (elastic#74560)
  Data plugin: Suggested enhance pattern (elastic#74505)
  Use jest.useFakeTimers instead of hard coded timeout for tooltip tests. (elastic#74642)
  [Security Solution][lists] Adds tests for exception lists and items part 2 (elastic#74815)
  [Security Solution][Resolver] fix presentation role on edgeline (elastic#74869)
  [Security Solution][Detections] Refactor ML calls for newest ML permissions (elastic#74582)
  [bin/kibana-plugin] support KP plugins instead (elastic#74604)
  Reduce number of indexed fields in index pattern saved object (elastic#74817)
  [reporting] Pass along generic parameters in high-order route handler (elastic#74892)
  Migrated last pieces of legacy fixture code (elastic#74470)
  Empty index patterns page re-design  (elastic#68819)
  [babel] coalese some versions to prevent breaking yarn install (elastic#74864)
  [Dashboard First] Decouple Attribute Service and By Value Embeddables (elastic#74302)
  Revert "[reporting] Pass along generic parameters in high-order route handler" (elastic#74891)
  [reporting] Pass along generic parameters in high-order route handler (elastic#74879)
  [src/dev/build] implement a getBuildNumber() mock (elastic#74881)
  [Enterprise Search] Add solution-level side navigation (elastic#74705)
  [DOCS] Canvas docs 7.9 refresh (elastic#74000)
  [Security Solution][Resolver]Enzyme test related events closing (elastic#74811)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Aug 13, 2020
* upstream/master: (45 commits)
  [Metrics UI] Fix inventory footer misalignment (elastic#74707)
  Remove legacy optimizer (elastic#73154)
  Update design-specific GH code-owners (elastic#74877)
  skip test Reporting paginates content elastic#74922
  [Metrics UI] Add Jest tests for alert previews (elastic#74890)
  Fixed tooltip (elastic#74074)
  [Ingest Pipelines] Processor forms for processors A-D (elastic#72849)
  [Observability] change ingest manager link (elastic#74928)
  [Task manager] Prevents edge case where already running tasks are reschedule every polling interval (elastic#74606)
  [Security Solution] Fix the status of timelines' bulk actions (elastic#74560)
  Data plugin: Suggested enhance pattern (elastic#74505)
  Use jest.useFakeTimers instead of hard coded timeout for tooltip tests. (elastic#74642)
  [Security Solution][lists] Adds tests for exception lists and items part 2 (elastic#74815)
  [Security Solution][Resolver] fix presentation role on edgeline (elastic#74869)
  [Security Solution][Detections] Refactor ML calls for newest ML permissions (elastic#74582)
  [bin/kibana-plugin] support KP plugins instead (elastic#74604)
  Reduce number of indexed fields in index pattern saved object (elastic#74817)
  [reporting] Pass along generic parameters in high-order route handler (elastic#74892)
  Migrated last pieces of legacy fixture code (elastic#74470)
  Empty index patterns page re-design  (elastic#68819)
  ...
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Aug 14, 2020
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

3 similar comments
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

walterra added a commit that referenced this pull request Aug 19, 2020
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:ml release_note:skip Skip the PR/issue when compiling release notes v7.9.1 v7.10.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants