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] [Uptime] Add timeout for slow process to skipped functional tests (#56065) #56135

Merged
merged 1 commit into from
Jan 28, 2020
Merged
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
20 changes: 12 additions & 8 deletions x-pack/test/functional/apps/uptime/overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';

export default ({ getPageObjects }: FtrProviderContext) => {
// TODO: add UI functional tests
export default ({ getPageObjects, getService }: FtrProviderContext) => {
const pageObjects = getPageObjects(['uptime']);
const retry = getService('retry');

describe('overview page', function() {
const DEFAULT_DATE_START = 'Sep 10, 2019 @ 12:40:08.078';
Expand Down Expand Up @@ -84,16 +84,18 @@ export default ({ getPageObjects }: FtrProviderContext) => {
]);
});

// Flakey, see https:/elastic/kibana/issues/54541
describe.skip('snapshot counts', () => {
describe('snapshot counts', () => {
it('updates the snapshot count when status filter is set to down', async () => {
await pageObjects.uptime.goToUptimePageAndSetDateRange(
DEFAULT_DATE_START,
DEFAULT_DATE_END
);
await pageObjects.uptime.setStatusFilter('down');
const counts = await pageObjects.uptime.getSnapshotCount();
expect(counts).to.eql({ up: '0', down: '7' });

await retry.tryForTime(12000, async () => {
const counts = await pageObjects.uptime.getSnapshotCount();
expect(counts).to.eql({ up: '0', down: '7' });
});
});

it('updates the snapshot count when status filter is set to up', async () => {
Expand All @@ -102,8 +104,10 @@ export default ({ getPageObjects }: FtrProviderContext) => {
DEFAULT_DATE_END
);
await pageObjects.uptime.setStatusFilter('up');
const counts = await pageObjects.uptime.getSnapshotCount();
expect(counts).to.eql({ up: '93', down: '0' });
await retry.tryForTime(12000, async () => {
const counts = await pageObjects.uptime.getSnapshotCount();
expect(counts).to.eql({ up: '93', down: '0' });
});
});
});
});
Expand Down