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

Failing test: Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/monitoring/elasticsearch/node_detail_mb·js - Monitoring app Elasticsearch node detail mb Offline Node should show node summary of NA for offline node #115267

Closed
kibanamachine opened this issue Oct 15, 2021 · 7 comments
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Monitoring Stack Monitoring team

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Oct 15, 2021

A test failed on a tracked branch

TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="elasticsearchNodeDetailStatus"] [data-test-subj="transportAddress"])
Wait timed out after 10051ms
    at /opt/local-ssd/buildkite/builds/kb-cigroup-6-ceb2082ab9ed2290/elastic/kibana-hourly/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5) {
  remoteStacktrace: ''
}

First failure: CI Build - 7.x

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Oct 15, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 15, 2021
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - 7.x

@jbudz
Copy link
Member

jbudz commented Oct 16, 2021

Skipped in #115255 (comment)

master: 9a15bee
7.x: dee55d3

@jbudz jbudz added skipped-test Team:Monitoring Stack Monitoring team and removed skipped-test labels Oct 16, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/stack-monitoring (Team:Monitoring)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Oct 16, 2021
@klacabane
Copy link
Contributor

Right before failing to locate the transportAddress element we're supposed to click a node in the "elasticsearch nodes list" which should route us to the node detail page where the element lives.

In the few failures I could reproduce locally, it looks like we register the click on the node but the redirection does not happen so we stay on the "nodes list" page and eventually fail. Could the link be disabled during a short time ? Could the redirection somehow loop us back to the nodes detail page ?

@klacabane
Copy link
Contributor

klacabane commented Oct 19, 2021

I've been experimenting with this test a bit without much success so far. To get the test to crash in a painless way I've wrapped the case in a for loop that executes it continuously until breakage.
Some points:

  • the page is in a functional state when the test breaks. The list of nodes is appearing, with clickable anchors that have correct href and a similar state than a working anchor (I've adding some attribute logging around the element we target).
  • the page being in a functional state, we click the anchor but we don't get redirection. To reiterate, when we click on it the anchor does have the correct href set and selenium is successfully registering a click event
  • when the test breaks, there is no http request sent (monitored via devtools network) when we click the anchor. we can move on with the hypothesis around a redirection loop that brings us back to the node list.
  • i experimented with some of the testSubjects methods, like isEnabled or isDisplayed to no avail

One positive point is that I could get the test to pass consistently by adding a 1sec sleep before clicking the link. Maybe we have a stale element ? I didn't find anything explicit about this so far:

const initialElement = getElement()
const initialId = element.id;
try {
  element.click();
} catch (/* click didnt work */) {
  const currentElement = getElement();
  assert(initialId === currentElement.id); // always true
}

@neptunian
Copy link
Contributor

I will try to reproduce locally as well. I wonder if, when it fails, the route is for the correct node page or still on the nodes listing page. Would be curious to log the current window.location.

@klacabane
Copy link
Contributor

Fixed by #115612

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Monitoring Stack Monitoring team
Projects
None yet
Development

No branches or pull requests

5 participants