Skip to content

Fix goToPage timing#7598

Merged
LeeDr merged 7 commits intoelastic:masterfrom
LeeDr:fixGoToPageTiming
Jul 7, 2016
Merged

Fix goToPage timing#7598
LeeDr merged 7 commits intoelastic:masterfrom
LeeDr:fixGoToPageTiming

Conversation

@LeeDr
Copy link

@LeeDr LeeDr commented Jun 30, 2016

Attempt to fix intermittent test failure when switching pages.

In this build;
http://build-eu-00.elastic.co/job/kibana_core_pr/4404/consoleFull

This StaleElementReference failure occurred in the click part of SettingsPage.goToPage.
We already do have a 1 second sleep in the test;

        return chain.then(function () {
          return settingsPage.goToPage(val)
          .then(function () {
            return common.sleep(1000);  <<<<<<<<<<<<<<
          })
          .then(function () {
            return settingsPage.getPageFieldCount();
          })

But rather than add more sleep, we should generally wait for the spinner to be hidden after clicks which cause it to appear during page loading. Maybe we could even remove the 1 second sleep, but I'm not taking that out at this point.

>> PASS: chrome on any platform - kibana - settings app - index result field sort - field list pagination - makelogs data should have expected number of fields (177ms)
>> PASS: chrome on any platform - kibana - settings app - index result field sort - field list pagination - should have correct default page size selected (61ms)
23:54:38.836: Taking screenshot "/home/jenkins/workspace/kibana_core_pr/test/screenshots/failure/failure_1467237278836_field list pagination_should have the correct number of rows per page.png"
23:54:38.957: Taking screenshot "/home/jenkins/workspace/kibana_core_pr/test/screenshots/failure/failure_1467237278957_field list pagination_should have the correct number of rows per page.png"
>> FAIL: chrome on any platform - kibana - settings app - index result field sort - field list pagination - should have the correct number of rows per page (364ms)
StaleElementReference: [POST http://localhost:4444/wd/hub/session/c184b330404399cc581758347ca4f9d2/element/0.46364852905669585-12/click] stale element reference: element is not attached to the page document
  (Session info: chrome=50.0.2661.75)
  (Driver info: chromedriver=2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a),platform=Linux 3.13.0-85-generic x86_64)
  at runRequest  <node_modules/intern/node_modules/leadfoot/Session.js:88:40>
  at <node_modules/intern/node_modules/leadfoot/Session.js:109:39>
  at new Promise  <node_modules/intern/node_modules/dojo/Promise.ts:411:3>
  at ProxiedSession._post  <node_modules/intern/node_modules/leadfoot/Session.js:63:10>
  at Element._post  <node_modules/intern/node_modules/leadfoot/Element.js:23:31>
  at Element.click  <node_modules/intern/node_modules/leadfoot/Element.js:163:15>
  at Command.<anonymous>  <test/support/page_objects/settings_page.js:246:21>
  at runCallback  <node_modules/intern/node_modules/leadfoot/Command.js:526:31>
  at Command.<anonymous>  <node_modules/intern/node_modules/leadfoot/Command.js:543:11>
  at <node_modules/intern/node_modules/dojo/Promise.ts:393:15>
  at run  <node_modules/intern/node_modules/dojo/Promise.ts:237:7>
  at <node_modules/intern/node_modules/dojo/nextTick.ts:44:3>
  at nextTickCallbackWith0Args  <node.js:420:9>
  at process._tickCallback  <node.js:349:13>
  at Command.then  <node_modules/intern/node_modules/leadfoot/Command.js:542:10>
  at SettingsPage.goToPage  <test/support/page_objects/settings_page.js:245:8>
  at <test/functional/apps/management/_index_pattern_results_sort.js:115:31>
  at run  <node_modules/babel-core/node_modules/core-js/modules/es6.promise.js:104:47>
  at <node_modules/babel-core/node_modules/core-js/modules/es6.promise.js:115:28>
  at flush  <node_modules/babel-core/node_modules/core-js/modules/$.microtask.js:19:5>
  at nextTickCallbackWith0Args  <node.js:420:9>
  at process._tickCallback  <node.js:349:13>
DEBUG - Glamor - action.admin.indices.template.delete - failed to delete templates [kibana-logstash-*]

@LeeDr LeeDr added the test label Jun 30, 2016
@jbudz
Copy link
Contributor

jbudz commented Jun 30, 2016

@LeeDr switching between pages won't make any network requests. Is it possible this is happening before the fields are done loading the first time around?

@LeeDr
Copy link
Author

LeeDr commented Jun 30, 2016

I watched and saw the spinner appear as I clicked through pages. Maybe it's not a network request but just loading data into the UI?

@LeeDr
Copy link
Author

LeeDr commented Jun 30, 2016

hmm, I was sure I saw the spinner when I tested it earlier. But I just tried again and now I'm not seeing it as I page.

@LeeDr
Copy link
Author

LeeDr commented Jun 30, 2016

jenkins, test it

3 similar comments
@LeeDr
Copy link
Author

LeeDr commented Jul 1, 2016

jenkins, test it

@LeeDr
Copy link
Author

LeeDr commented Jul 1, 2016

jenkins, test it

@LeeDr
Copy link
Author

LeeDr commented Jul 1, 2016

jenkins, test it

@LeeDr
Copy link
Author

LeeDr commented Jul 1, 2016

I've added another commit to fix another StaleElementReference in the data table tests;

http://build-eu-00.elastic.co/job/kibana_core_pr/4433/console

>> PASS: chrome on any platform - kibana - visualize app - visualize app - data table - should be able to save and load (8439ms)
18:33:27.604: Taking screenshot "/home/jenkins/workspace/kibana_core_pr/test/screenshots/failure/failure_1467390807604_data table_should show correct data, take screenshot.png"
>> FAIL: chrome on any platform - kibana - visualize app - visualize app - data table - should show correct data, take screenshot (366ms)
StaleElementReference: [GET http://localhost:4444/wd/hub/session/154cbe864167576e0291ec98a1300e51/element/0.18451381914588016-26/text] stale element reference: element is not attached to the page document
  (Session info: chrome=50.0.2661.75)
  (Driver info: chromedriver=2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a),platform=Linux 3.13.0-24-generic x86_64)
  at runRequest  <node_modules/intern/node_modules/leadfoot/Session.js:88:40>
  at <node_modules/intern/node_modules/leadfoot/Session.js:109:39>
  at new Promise  <node_modules/intern/node_modules/dojo/Promise.ts:411:3>
  at ProxiedSession._get  <node_modules/intern/node_modules/leadfoot/Session.js:63:10>
  at Element._get  <node_modules/intern/node_modules/leadfoot/Element.js:23:31>
  at Element.getVisibleText  <node_modules/intern/node_modules/leadfoot/Element.js:199:21>
  at Command.<anonymous>  <node_modules/intern/node_modules/leadfoot/Command.js:680:19>
  at <node_modules/intern/node_modules/dojo/Promise.ts:393:15>
  at run  <node_modules/intern/node_modules/dojo/Promise.ts:237:7>
  at <node_modules/intern/node_modules/dojo/nextTick.ts:44:3>
  at nextTickCallbackWith0Args  <node.js:420:9>
  at process._tickCallback  <node.js:349:13>
  at Command.target.(anonymous function) [as getVisibleText]  <node_modules/intern/node_modules/leadfoot/Command.js:674:11>
  at VisualizePage.getDataTableData  <test/support/page_objects/visualize_page.js:651:8>
  at Test.pageHeader  <test/functional/apps/visualize/_data_table.js:81:28>
  at tryCatcher  <node_modules/bluebird/js/main/util.js:26:23>
  at Promise.attempt.Promise.try  <node_modules/bluebird/js/main/method.js:31:24>
  at Test.test  <test/support/utils/bdd_wrapper.js:17:14>
  at <node_modules/intern/lib/Test.js:181:24>
  at <node_modules/intern/browser_modules/dojo/Promise.ts:393:15>
  at runCallbacks  <node_modules/intern/browser_modules/dojo/Promise.ts:11:11>
  at <node_modules/intern/browser_modules/dojo/Promise.ts:317:4>
  at run  <node_modules/intern/browser_modules/dojo/Promise.ts:237:7>
  at <node_modules/intern/browser_modules/dojo/nextTick.ts:44:3>
  at nextTickCallbackWith0Args  <node.js:420:9>
  at process._tickCallback  <node.js:349:13>

@LeeDr
Copy link
Author

LeeDr commented Jul 6, 2016

jenkins, test it

@LeeDr
Copy link
Author

LeeDr commented Jul 6, 2016

jenkins, test it

@LeeDr
Copy link
Author

LeeDr commented Jul 6, 2016

jenkins, test this

2 similar comments
@LeeDr
Copy link
Author

LeeDr commented Jul 6, 2016

jenkins, test this

@LeeDr
Copy link
Author

LeeDr commented Jul 7, 2016

jenkins, test this

@LeeDr
Copy link
Author

LeeDr commented Jul 7, 2016

Last run elastic+kibana+master+multijob-pr-selenium build #36 ( 12 min ) passed

@LeeDr
Copy link
Author

LeeDr commented Jul 7, 2016

jenkins, test this

@LeeDr
Copy link
Author

LeeDr commented Jul 7, 2016

I ran this PR on my laptop overnight. 53 passes in a row with no failures.

@LeeDr
Copy link
Author

LeeDr commented Jul 7, 2016

jenkins, test this

@LeeDr
Copy link
Author

LeeDr commented Jul 7, 2016

Re-summarizing the changes;

1). I've added getSpinnerDone in 3 places where we've had test failures like StaleElementReference (means the page changed between finding an element and performing some action with it).
2). Some clean-up. Removed a reference to a selenium we're not using. And removed some unnecessary promise nesting.

@jbudz
Copy link
Contributor

jbudz commented Jul 7, 2016

LGTM

@LeeDr LeeDr merged commit 58ec489 into elastic:master Jul 7, 2016
elastic-jasper added a commit that referenced this pull request Jul 25, 2016
---------

**Commit 1:**
Add getSpinnerDone after clicking a new page in index pattern field list

* Original sha: cfe8563
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-06-30T19:44:57Z

**Commit 2:**
Add a debug log so we can tell what page we're going to if we fail

* Original sha: 583c890
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-06-30T20:13:56Z

**Commit 3:**
Try to fix another staleElementReference in data table test

* Original sha: a8c1b4e
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-07-01T22:40:01Z

**Commit 4:**
Changes to fix settings page failure

* Original sha: 7f5590a
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-07-06T20:46:00Z

**Commit 5:**
Merge branch 'master' into fixGoToPageTiming

* Original sha: 39bcb7f
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-07-06T20:47:16Z

**Commit 6:**
Fix a headerPage typo, un-nest some promises.

* Original sha: 2945d75
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-07-06T21:44:44Z

**Commit 7:**
change other headerPage to header

* Original sha: 2953d84
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-07-06T22:14:12Z
elastic-jasper added a commit that referenced this pull request Jul 25, 2016
---------

**Commit 1:**
Add getSpinnerDone after clicking a new page in index pattern field list

* Original sha: cfe8563
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-06-30T19:44:57Z

**Commit 2:**
Add a debug log so we can tell what page we're going to if we fail

* Original sha: 583c890
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-06-30T20:13:56Z

**Commit 3:**
Try to fix another staleElementReference in data table test

* Original sha: a8c1b4e
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-07-01T22:40:01Z

**Commit 4:**
Changes to fix settings page failure

* Original sha: 7f5590a
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-07-06T20:46:00Z

**Commit 5:**
Merge branch 'master' into fixGoToPageTiming

* Original sha: 39bcb7f
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-07-06T20:47:16Z

**Commit 6:**
Fix a headerPage typo, un-nest some promises.

* Original sha: 2945d75
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-07-06T21:44:44Z

**Commit 7:**
change other headerPage to header

* Original sha: 2953d84
* Authored by LeeDr <lee.drengenberg@elastic.co> on 2016-07-06T22:14:12Z
@LeeDr LeeDr added v4.5.4 and removed v4.5.4 labels Jul 25, 2016
@epixa epixa added v5.0.0 and removed v5.0.0 labels Aug 1, 2016
airow pushed a commit to airow/kibana that referenced this pull request Feb 16, 2017
Fix goToPage timing

Former-commit-id: 58ec489
@LeeDr LeeDr deleted the fixGoToPageTiming branch May 23, 2017 13:57
cee-chen added a commit that referenced this pull request Apr 1, 2024
`v93.5.1` ⏩ `v93.5.2`

---

## [`v93.5.2`](https://github.com/elastic/eui/releases/v93.5.2)

**Dependency updates**

- Updated `react-virtualized-auto-sizer` to 1.0.24
([#7598](elastic/eui#7598))
- Updated `react-window` to 1.8.10
([#7600](elastic/eui#7600))

**CSS-in-JS conversions**

- Updated EUI's internal style memoization/performance utility to have
configurable error/warning levels via `setEuiDevProviderWarning`
([#7626](elastic/eui#7626))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants