Skip to content

Commit

Permalink
Handle cloud test failures (#74162)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
chrisronline and elasticmachine authored Aug 31, 2020
1 parent 047c608 commit 7826246
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default function ({ getService, getPageObjects }) {
const PageObjects = getPageObjects(['monitoring', 'common', 'header']);
const esSupertest = getService('esSupertest');
const noData = getService('monitoringNoData');
const testSubjects = getService('testSubjects');
const clusterOverview = getService('monitoringClusterOverview');
const retry = getService('retry');

Expand Down Expand Up @@ -46,8 +47,10 @@ export default function ({ getService, getPageObjects }) {
});

// Here we are checking that once Monitoring is enabled,
//it moves on to the cluster overview page.
await retry.try(async () => {
// it moves on to the cluster overview page.
await retry.tryForTime(10000, async () => {
// Click the refresh button
await testSubjects.click('querySubmitButton');
expect(await clusterOverview.isOnClusterOverview()).to.be(true);
});
});
Expand Down
11 changes: 3 additions & 8 deletions x-pack/test/functional/apps/monitoring/time_filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import expect from '@kbn/expect';
import { getLifecycleMethods } from './_get_lifecycle_methods';

const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

export default function ({ getService, getPageObjects }) {
const PageObjects = getPageObjects(['header', 'timePicker']);
const testSubjects = getService('testSubjects');
Expand Down Expand Up @@ -36,12 +34,9 @@ export default function ({ getService, getPageObjects }) {
expect(isLoading).to.be(true);
});

it('should send another request when changing the time picker', async () => {
/**
* TODO: The value should either be removed or lowered after:
* https://github.com/elastic/kibana/issues/72997 is resolved
*/
await delay(3000);
// TODO: [cr] I'm not sure this test is any better than the above one, we might need to rely solely on unit tests
// for this functionality
it.skip('should send another request when changing the time picker', async () => {
await PageObjects.timePicker.setAbsoluteRange(
'Aug 15, 2016 @ 21:00:00.000',
'Aug 16, 2016 @ 00:00:00.000'
Expand Down

0 comments on commit 7826246

Please sign in to comment.