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] Unskip doc link functional test #66884

Conversation

kertal
Copy link
Member

@kertal kertal commented May 18, 2020

Summary

While it wasn't possible to reproduce the flakiness of the test, neither with the flaky test runner, nor locally, I've improved the test for potential failings, and removed unnecessary actions.

Fixes #62281

@kertal kertal self-assigned this May 18, 2020
['extension', 'jpg'],
['geo.src', 'IN'],
];

Copy link
Member Author

Choose a reason for hiding this comment

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

It's no necessary for the test to add columns and filters

});

it('should open the doc view of the selected document', async function() {
// navigate to the doc view
await docTable.clickRowToggle({ rowIndex: 0 });
await (await docTable.getRowActions({ rowIndex: 0 }))[1].click();
Copy link
Member Author

@kertal kertal May 18, 2020

Choose a reason for hiding this comment

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

Here is the point where some failures happened. Maybe the navigation wasn't rendered / to late?

TypeError: Cannot read property 'click' of undefined
    at Context.<anonymous> (test/functional/apps/discover/_doc_navigation.js:53:64)
    at process._tickCallback (internal/process/next_tick.js:68:7)

but the screens I've got were not usefull, since they were scrolled down. In a future failure there should be a useful screen, also I thought that maybe a bit of sleep could prevent a possible race condition between opening the document detail and clicking the row action button.

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe a bit of sleep could prevent a possible race condition between opening the document detail and clicking the row action button

Sounds like what you want is a retry.waitFor(() => checkIfRowOpenedSomehow()). Putting an arbitrary sleep in here doesn't really prevent anything since the timing on CI is wildly unpredictable. Only way to add safeguards is with retries that are based on specific checks.

Copy link
Contributor

@spalger spalger May 18, 2020

Choose a reason for hiding this comment

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

Actually, even better:

// click the open action
await retry.try(async () => {
  const rowActions = await docTable.getRowActions({ rowIndex: 0 });
  if (!rowActions.length) {
    throw new Error('row actions empty, trying again')
  }
  
  await rowActions[1].click()
})

Copy link
Member Author

Choose a reason for hiding this comment

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

agreed and adapted the code for this case, recent flaky run also just finished successfully (https://kibana-ci.elastic.co/job/kibana+flaky-test-suite-runner/465).
I'd love to have a kind of alert when this test would fail again

@kertal kertal requested review from dmlemeshko and spalger May 18, 2020 11:53
@kertal kertal added Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes v7.8.0 v7.9.0 v8.0.0 Team:Visualizations Visualization editors, elastic-charts and infrastructure labels May 18, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@kertal
Copy link
Member Author

kertal commented May 18, 2020

@elasticmachine merge upstream

@kertal
Copy link
Member Author

kertal commented May 18, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

Copy link
Contributor

@spalger spalger 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
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

LGTM

@kertal kertal merged commit 0d71ed2 into elastic:master May 19, 2020
kertal added a commit to kertal/kibana that referenced this pull request May 19, 2020
Co-authored-by: Spencer Alger <email@spalger.com>
kertal added a commit to kertal/kibana that referenced this pull request May 19, 2020
Co-authored-by: Spencer Alger <email@spalger.com>
kertal added a commit that referenced this pull request May 19, 2020
Co-authored-by: Spencer Alger <email@spalger.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request May 19, 2020
* master: (24 commits)
  [APM] agent config 'profiling_inferred_spans_min_duration' default value is '0ms' but the min value in the field is '1ms' (elastic#66886)
  [Canvas] Fix flaky custom element functional tests (elastic#65908)
  Fix IE specific flexbox min-height issue (elastic#66555)
  [Discover] Unskip doc link functional test (elastic#66884)
  Index pattern management to Kibana platform (elastic#65026)
  Warning and link to support matrix for IE11 (elastic#66512)
  [Reporting] Consolidate Server Type Defs, move some out of Legacy (elastic#66144)
  [SIEM] [Maps] Fixes Network Map empty tooltip (elastic#66828)
  [Endpoint] Encode the index of the alert in the id response (elastic#66919)
  [services/testSubjects] reduce retry usage, add waitForEnabled (elastic#66538)
  [DOCS] Identifies cloud settings for APM (elastic#66935)
  [SIEM][CASE] Fix configuration's page user experience (elastic#66029)
  Resolver: Display node 75% view submenus (elastic#64121)
  [SIEM] Cases] Capture timeline click and open timeline in case view (elastic#66327)
  [APM] Lowercase agent names so icons work (elastic#66824)
  [dev/cli] add support for --no-cache (elastic#66837)
  [Ingest Manager] Better handling of package installation problems (elastic#66541)
  [ML] Enhances api docs for modules endpoints (elastic#66738)
  dont hide errors (elastic#66764)
  [RFC] Global search API (elastic#64284)
  ...
kertal added a commit that referenced this pull request May 19, 2020
Co-authored-by: Spencer Alger <email@spalger.com>

Co-authored-by: Spencer Alger <email@spalger.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@kertal kertal deleted the kertal-pr-2020-05-18-discover_dov_navigation_functional branch July 1, 2020 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.8.0 v7.9.0 v8.0.0
Projects
None yet
5 participants