Skip to content

Commit a49fbe4

Browse files
committed
reduce timeouts
1 parent 3184f48 commit a49fbe4

File tree

7 files changed

+39
-55
lines changed

7 files changed

+39
-55
lines changed

x-pack/platform/test/functional/apps/lens/group4/tsdb.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
5757
'dateFormat:tz': 'UTC',
5858
defaultIndex: '0ae0bc7a-e4ca-405c-ab67-f2b5913f2a51',
5959
'timepicker:timeDefaults': `{ "from": "${fromTime}", "to": "${toTime}" }`,
60+
hideAnnouncements: true,
6061
});
6162
});
6263

@@ -92,6 +93,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
9293
describe('for regular metric', () => {
9394
it('defaults to median for non-rolled up metric', async () => {
9495
await common.navigateToApp('lens');
96+
await lens.switchDataPanelIndexPattern(tsdbDataView);
9597
await lens.waitForField('bytes_gauge');
9698
await lens.dragFieldToWorkspace('bytes_gauge', 'xyVisChart');
9799
expect(await lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.eql(
@@ -198,22 +200,20 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
198200
keepOpen: true,
199201
});
200202

201-
// now check if the provided function has no incompatibility tooltip
202203
for (const supportedOp of supportedOperations) {
204+
// now check if the provided function has no incompatibility tooltip
203205
expect(
204206
testSubjects.exists(`lns-indexPatternDimension-${supportedOp.name} incompatible`, {
205207
timeout: 500,
206208
})
207209
).to.eql(supportedOp[fieldType]);
208-
}
209-
210-
for (const supportedOp of supportedOperations) {
211210
// try to change to the provided function and check all is ok
212211
await lens.selectOperation(supportedOp.name);
213212

214213
expect(
215214
await find.existsByCssSelector(
216-
'[data-test-subj="indexPattern-field-selection-row"] .euiFormErrorText'
215+
'[data-test-subj="indexPattern-field-selection-row"] .euiFormErrorText',
216+
500
217217
)
218218
).to.be(false);
219219

@@ -240,8 +240,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
240240
keepOpen: true,
241241
});
242242

243-
// now check if the provided function has the incompatibility tooltip
244243
for (const unsupportedOp of unsupportedOperatons) {
244+
// now check if the provided function has the incompatibility tooltip
245245
expect(
246246
testSubjects.exists(
247247
`lns-indexPatternDimension-${unsupportedOp.name} incompatible`,
@@ -250,14 +250,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
250250
}
251251
)
252252
).to.eql(!unsupportedOp[fieldType]);
253-
}
254-
255-
for (const unsupportedOp of unsupportedOperatons) {
256253
// try to change to the provided function and check if it's in an incompatibility state
257254
await lens.selectOperation(unsupportedOp.name, true);
258255

259256
const fieldSelectErrorEl = await find.byCssSelector(
260-
'[data-test-subj="indexPattern-field-selection-row"] .euiFormErrorText'
257+
'[data-test-subj="indexPattern-field-selection-row"] .euiFormErrorText',
258+
500
261259
);
262260

263261
expect(await fieldSelectErrorEl.getVisibleText()).to.be(

x-pack/platform/test/functional/apps/lens/group7/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext
1717
const config = getService('config');
1818
let remoteEsArchiver;
1919

20-
describe('lens app - group 4', () => {
20+
describe('lens app - group 7', () => {
2121
const esArchive = 'x-pack/platform/test/fixtures/es_archives/logstash_functional';
2222
const localIndexPatternString = 'logstash-*';
2323
const remoteIndexPatternString = 'ftr-remote:logstash-*';
@@ -72,8 +72,7 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext
7272
await kibanaServer.savedObjects.cleanStandardList();
7373
});
7474

75-
// total run time ~30m
76-
loadTestFile(require.resolve('./logsdb')); // 30m
77-
// loadTestFile(require.resolve('./esql'));
75+
loadTestFile(require.resolve('./logsdb')); // 43m
76+
loadTestFile(require.resolve('./esql'));
7877
});
7978
};

x-pack/platform/test/functional/apps/lens/group7/logsdb.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
6161
'dateFormat:tz': 'UTC',
6262
defaultIndex: '0ae0bc7a-e4ca-405c-ab67-f2b5913f2a51',
6363
'timepicker:timeDefaults': `{ "from": "${fromTime}", "to": "${toTime}" }`,
64+
hideAnnouncements: true,
6465
});
6566
});
6667

@@ -223,8 +224,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
223224

224225
runTestsForEachScenario(streamConvertedToLogsDBIndex, 'logsdb', (indexes) => {
225226
it(`should visualize a date histogram chart`, async () => {
226-
await lens.ensureLayerTabIsActive();
227-
228227
await lens.configureDimension({
229228
dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension',
230229
operation: 'date_histogram',
@@ -251,8 +250,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
251250
});
252251

253252
it(`should visualize a date histogram chart using a different date field`, async () => {
254-
await lens.ensureLayerTabIsActive();
255-
256253
await lens.configureDimension({
257254
dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension',
258255
operation: 'date_histogram',
@@ -279,8 +276,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
279276
});
280277

281278
it('should visualize an annotation layer from a logsDB stream', async () => {
282-
await lens.ensureLayerTabIsActive();
283-
284279
await lens.configureDimension({
285280
dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension',
286281
operation: 'date_histogram',
@@ -318,8 +313,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
318313
});
319314

320315
it('should visualize an annotation layer from a logsDB stream using another time field', async () => {
321-
await lens.ensureLayerTabIsActive();
322-
323316
await lens.configureDimension({
324317
dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension',
325318
operation: 'date_histogram',
@@ -427,8 +420,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
427420

428421
runTestsForEachScenario(logsdbConvertedToStream, 'logsdb', (indexes) => {
429422
it(`should visualize a date histogram chart`, async () => {
430-
await lens.ensureLayerTabIsActive();
431-
432423
await lens.configureDimension({
433424
dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension',
434425
operation: 'date_histogram',
@@ -455,8 +446,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
455446
});
456447

457448
it(`should visualize a date histogram chart using a different date field`, async () => {
458-
await lens.ensureLayerTabIsActive();
459-
460449
await lens.configureDimension({
461450
dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension',
462451
operation: 'date_histogram',
@@ -483,8 +472,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
483472
});
484473

485474
it('should visualize an annotation layer from a logsDB stream', async () => {
486-
await lens.ensureLayerTabIsActive();
487-
488475
await lens.configureDimension({
489476
dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension',
490477
operation: 'date_histogram',
@@ -522,8 +509,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
522509
});
523510

524511
it('should visualize an annotation layer from a logsDB stream using another time field', async () => {
525-
await lens.ensureLayerTabIsActive();
526-
527512
await lens.configureDimension({
528513
dimension: 'lnsXY_xDimensionPanel > lns-empty-dimension',
529514
operation: 'date_histogram',

x-pack/platform/test/functional/apps/lens/tsdb_logsdb_helpers.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,12 @@ export function setupScenarioRunner(
451451
);
452452
});
453453

454+
beforeEach(async () => {
455+
await lens.switchDataPanelIndexPattern(dataViewName);
456+
await lens.removeLayer();
457+
await lens.ensureLayerTabIsActive();
458+
});
459+
454460
after(async () => {
455461
for (const { index, create, mode: indexMode } of indexes) {
456462
if (create) {
@@ -468,12 +474,6 @@ export function setupScenarioRunner(
468474
}
469475
});
470476

471-
beforeEach(async () => {
472-
await lens.switchDataPanelIndexPattern(dataViewName);
473-
await lens.removeLayer();
474-
await lens.ensureLayerTabIsActive();
475-
});
476-
477477
testingFn(indexes);
478478
});
479479
}

x-pack/platform/test/functional/page_objects/lens_page.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,16 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
195195
disableEmptyRows?: boolean;
196196
}) {
197197
await retry.try(async () => {
198-
if (!(await testSubjects.exists('lns-indexPattern-dimensionContainerClose'))) {
198+
if (
199+
!(await testSubjects.exists('lns-indexPattern-dimensionContainerClose', {
200+
timeout: 1000,
201+
}))
202+
) {
199203
await testSubjects.click(opts.dimension);
200204
}
201-
await testSubjects.existOrFail('lns-indexPattern-dimensionContainerClose');
205+
await testSubjects.existOrFail('lns-indexPattern-dimensionContainerClose', {
206+
timeout: 1000,
207+
});
202208
});
203209

204210
if (opts.operation === 'formula') {

x-pack/platform/test/serverless/functional/test_suites/visualizations/group5/tsdb.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
7575

7676
// FLAKY: https://github.com/elastic/kibana/issues/232416
7777
// FLAKY: https://github.com/elastic/kibana/issues/232417
78-
describe.skip('downsampling', () => {
78+
describe('downsampling', () => {
7979
const downsampleDataView: { index: string; dataView: string } = { index: '', dataView: '' };
8080
before(async () => {
8181
const downsampledTargetIndex = await dataStreams.downsampleTSDBIndex(tsdbIndex, {
@@ -208,22 +208,20 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
208208
keepOpen: true,
209209
});
210210

211-
// now check if the provided function has no incompatibility tooltip
212211
for (const supportedOp of supportedOperations) {
212+
// now check if the provided function has no incompatibility tooltip
213213
expect(
214214
testSubjects.exists(`lns-indexPatternDimension-${supportedOp.name} incompatible`, {
215215
timeout: 500,
216216
})
217217
).to.eql(supportedOp[fieldType]);
218-
}
219-
220-
for (const supportedOp of supportedOperations) {
221218
// try to change to the provided function and check all is ok
222219
await lens.selectOperation(supportedOp.name);
223220

224221
expect(
225222
await find.existsByCssSelector(
226-
'[data-test-subj="indexPattern-field-selection-row"] .euiFormErrorText'
223+
'[data-test-subj="indexPattern-field-selection-row"] .euiFormErrorText',
224+
500
227225
)
228226
).to.be(false);
229227

@@ -250,8 +248,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
250248
keepOpen: true,
251249
});
252250

253-
// now check if the provided function has the incompatibility tooltip
254251
for (const unsupportedOp of unsupportedOperatons) {
252+
// now check if the provided function has the incompatibility tooltip
255253
expect(
256254
testSubjects.exists(
257255
`lns-indexPatternDimension-${unsupportedOp.name} incompatible`,
@@ -260,14 +258,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
260258
}
261259
)
262260
).to.eql(!unsupportedOp[fieldType]);
263-
}
264-
265-
for (const unsupportedOp of unsupportedOperatons) {
266261
// try to change to the provided function and check if it's in an incompatibility state
267262
await lens.selectOperation(unsupportedOp.name, true);
268263

269264
const fieldSelectErrorEl = await find.byCssSelector(
270-
'[data-test-subj="indexPattern-field-selection-row"] .euiFormErrorText'
265+
'[data-test-subj="indexPattern-field-selection-row"] .euiFormErrorText',
266+
500
271267
);
272268

273269
expect(await fieldSelectErrorEl.getVisibleText()).to.be(

x-pack/platform/test/serverless/functional/test_suites/visualizations/group6/logsdb.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ import {
1717
} from '../tsdb_logsdb_helpers';
1818

1919
export default function ({ getService, getPageObjects }: FtrProviderContext) {
20-
const { common, lens, discover, header, svlCommonPage } = getPageObjects([
20+
const { common, lens, discover, header, timePicker, svlCommonPage } = getPageObjects([
2121
'common',
2222
'lens',
2323
'discover',
2424
'header',
25+
'timePicker',
2526
'svlCommonPage',
2627
]);
2728
const testSubjects = getService('testSubjects');
@@ -71,6 +72,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
7172
after(async () => {
7273
await kibanaServer.savedObjects.cleanStandardList();
7374
await kibanaServer.uiSettings.replace({});
75+
await timePicker.setDefaultAbsoluteRangeViaUiSettings();
7476
await es.indices.delete({ index: [logsdbIndex] });
7577
});
7678

@@ -120,22 +122,20 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
120122
keepOpen: true,
121123
});
122124

123-
// now check that operations won't show the incompatibility tooltip
124125
for (const operation of allOperations) {
126+
// now check that operations won't show the incompatibility tooltip
125127
expect(
126128
testSubjects.exists(`lns-indexPatternDimension-${operation} incompatible`, {
127129
timeout: 500,
128130
})
129131
).to.eql(false);
130-
}
131-
132-
for (const operation of allOperations) {
133132
// try to change to the provided function and check all is ok
134133
await lens.selectOperation(operation);
135134

136135
expect(
137136
await find.existsByCssSelector(
138-
'[data-test-subj="indexPattern-field-selection-row"] .euiFormErrorText'
137+
'[data-test-subj="indexPattern-field-selection-row"] .euiFormErrorText',
138+
500
139139
)
140140
).to.be(false);
141141
}

0 commit comments

Comments
 (0)