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

[7.x] Handle cloud test failures (#74162) #76315

Merged
merged 1 commit into from
Aug 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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