forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lens] split x-pack/test/functional/apps/lens/group3/config.ts into s…
…maller groups (elastic#155860) ## Summary Re-grouping lens functional tests into 6 groups since 2 groups often cross the 35+ min runtime. Also, we have retry in place so pipeline might have +40 minutes run if any of test fails. <img width="1354" alt="image" src="https://user-images.githubusercontent.com/10977896/234843379-aec47a81-22dc-4ecf-aee5-b1d489b3b31f.png"> x-pack/test/functional/apps/lens/group1/config.ts 18m 42s x-pack/test/functional/apps/lens/group2/config.ts 19m 26s x-pack/test/functional/apps/lens/group3/config.ts 18m 26s x-pack/test/functional/apps/lens/group4/config.ts 18m 40s x-pack/test/functional/apps/lens/group5/config.ts 17m 55s x-pack/test/functional/apps/lens/group6/config.ts 19m 24s --------- Co-authored-by: Jon <[email protected]> (cherry picked from commit 483edea)
- Loading branch information
1 parent
26d7c5a
commit dee2f9e
Showing
47 changed files
with
333 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrConfigProviderContext } from '@kbn/test'; | ||
|
||
export default async function ({ readConfigFile }: FtrConfigProviderContext) { | ||
const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js')); | ||
|
||
return { | ||
...functionalConfig.getAll(), | ||
testFiles: [require.resolve('.')], | ||
}; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { EsArchiver } from '@kbn/es-archiver'; | ||
import { FtrProviderContext } from '../../../ftr_provider_context'; | ||
|
||
export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext) => { | ||
const browser = getService('browser'); | ||
const log = getService('log'); | ||
const esArchiver = getService('esArchiver'); | ||
const kibanaServer = getService('kibanaServer'); | ||
const PageObjects = getPageObjects(['timePicker']); | ||
const config = getService('config'); | ||
let remoteEsArchiver; | ||
|
||
describe('lens app - group 4', () => { | ||
const esArchive = 'x-pack/test/functional/es_archives/logstash_functional'; | ||
const localIndexPatternString = 'logstash-*'; | ||
const remoteIndexPatternString = 'ftr-remote:logstash-*'; | ||
const localFixtures = { | ||
lensBasic: 'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json', | ||
lensDefault: 'x-pack/test/functional/fixtures/kbn_archiver/lens/default', | ||
}; | ||
|
||
const remoteFixtures = { | ||
lensBasic: 'x-pack/test/functional/fixtures/kbn_archiver/lens/ccs/lens_basic.json', | ||
lensDefault: 'x-pack/test/functional/fixtures/kbn_archiver/lens/ccs/default', | ||
}; | ||
let esNode: EsArchiver; | ||
let fixtureDirs: { | ||
lensBasic: string; | ||
lensDefault: string; | ||
}; | ||
let indexPatternString: string; | ||
before(async () => { | ||
await log.debug('Starting lens before method'); | ||
await browser.setWindowSize(1280, 1200); | ||
await kibanaServer.savedObjects.cleanStandardList(); | ||
try { | ||
config.get('esTestCluster.ccs'); | ||
remoteEsArchiver = getService('remoteEsArchiver' as 'esArchiver'); | ||
esNode = remoteEsArchiver; | ||
fixtureDirs = remoteFixtures; | ||
indexPatternString = remoteIndexPatternString; | ||
} catch (error) { | ||
esNode = esArchiver; | ||
fixtureDirs = localFixtures; | ||
indexPatternString = localIndexPatternString; | ||
} | ||
|
||
await esNode.load(esArchive); | ||
// changing the timepicker default here saves us from having to set it in Discover (~8s) | ||
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings(); | ||
await kibanaServer.uiSettings.update({ | ||
defaultIndex: indexPatternString, | ||
'dateFormat:tz': 'UTC', | ||
}); | ||
await kibanaServer.importExport.load(fixtureDirs.lensBasic); | ||
await kibanaServer.importExport.load(fixtureDirs.lensDefault); | ||
}); | ||
|
||
after(async () => { | ||
await esArchiver.unload(esArchive); | ||
await PageObjects.timePicker.resetDefaultAbsoluteRangeViaUiSettings(); | ||
await kibanaServer.importExport.unload(fixtureDirs.lensBasic); | ||
await kibanaServer.importExport.unload(fixtureDirs.lensDefault); | ||
await kibanaServer.savedObjects.cleanStandardList(); | ||
}); | ||
|
||
// total run time ~16m 30s | ||
loadTestFile(require.resolve('./colors')); // 1m 2s | ||
loadTestFile(require.resolve('./chart_data')); // 1m 10s | ||
loadTestFile(require.resolve('./time_shift')); // 1m | ||
loadTestFile(require.resolve('./dashboard')); // 6m 45s | ||
loadTestFile(require.resolve('./show_underlying_data')); // 2m | ||
loadTestFile(require.resolve('./show_underlying_data_dashboard')); // 2m 10s | ||
loadTestFile(require.resolve('./share')); // 1m 20s | ||
// keep it last in the group | ||
loadTestFile(require.resolve('./tsdb')); // 1m | ||
}); | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrConfigProviderContext } from '@kbn/test'; | ||
|
||
export default async function ({ readConfigFile }: FtrConfigProviderContext) { | ||
const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js')); | ||
|
||
return { | ||
...functionalConfig.getAll(), | ||
testFiles: [require.resolve('.')], | ||
}; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { EsArchiver } from '@kbn/es-archiver'; | ||
import { FtrProviderContext } from '../../../ftr_provider_context'; | ||
|
||
export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext) => { | ||
const browser = getService('browser'); | ||
const log = getService('log'); | ||
const esArchiver = getService('esArchiver'); | ||
const kibanaServer = getService('kibanaServer'); | ||
const PageObjects = getPageObjects(['timePicker']); | ||
const config = getService('config'); | ||
let remoteEsArchiver; | ||
|
||
describe('lens app - group 5', () => { | ||
const esArchive = 'x-pack/test/functional/es_archives/logstash_functional'; | ||
const localIndexPatternString = 'logstash-*'; | ||
const remoteIndexPatternString = 'ftr-remote:logstash-*'; | ||
const localFixtures = { | ||
lensBasic: 'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json', | ||
lensDefault: 'x-pack/test/functional/fixtures/kbn_archiver/lens/default', | ||
}; | ||
|
||
const remoteFixtures = { | ||
lensBasic: 'x-pack/test/functional/fixtures/kbn_archiver/lens/ccs/lens_basic.json', | ||
lensDefault: 'x-pack/test/functional/fixtures/kbn_archiver/lens/ccs/default', | ||
}; | ||
let esNode: EsArchiver; | ||
let fixtureDirs: { | ||
lensBasic: string; | ||
lensDefault: string; | ||
}; | ||
let indexPatternString: string; | ||
before(async () => { | ||
log.debug('Starting lens before method'); | ||
await browser.setWindowSize(1280, 1200); | ||
await kibanaServer.savedObjects.cleanStandardList(); | ||
try { | ||
config.get('esTestCluster.ccs'); | ||
remoteEsArchiver = getService('remoteEsArchiver' as 'esArchiver'); | ||
esNode = remoteEsArchiver; | ||
fixtureDirs = remoteFixtures; | ||
indexPatternString = remoteIndexPatternString; | ||
} catch (error) { | ||
esNode = esArchiver; | ||
fixtureDirs = localFixtures; | ||
indexPatternString = localIndexPatternString; | ||
} | ||
|
||
await esNode.load(esArchive); | ||
// changing the timepicker default here saves us from having to set it in Discover (~8s) | ||
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings(); | ||
await kibanaServer.uiSettings.update({ | ||
defaultIndex: indexPatternString, | ||
'dateFormat:tz': 'UTC', | ||
}); | ||
await kibanaServer.importExport.load(fixtureDirs.lensBasic); | ||
await kibanaServer.importExport.load(fixtureDirs.lensDefault); | ||
}); | ||
|
||
after(async () => { | ||
await esArchiver.unload(esArchive); | ||
await PageObjects.timePicker.resetDefaultAbsoluteRangeViaUiSettings(); | ||
await kibanaServer.importExport.unload(fixtureDirs.lensBasic); | ||
await kibanaServer.importExport.unload(fixtureDirs.lensDefault); | ||
await kibanaServer.savedObjects.cleanStandardList(); | ||
}); | ||
|
||
// total run time ~ 16m | ||
loadTestFile(require.resolve('./drag_and_drop')); // 7m 40s | ||
loadTestFile(require.resolve('./geo_field')); // 26s | ||
loadTestFile(require.resolve('./formula')); // 5m 52s | ||
loadTestFile(require.resolve('./heatmap')); // 51s | ||
loadTestFile(require.resolve('./gauge')); // 1m 17s | ||
}); | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrConfigProviderContext } from '@kbn/test'; | ||
|
||
export default async function ({ readConfigFile }: FtrConfigProviderContext) { | ||
const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js')); | ||
|
||
return { | ||
...functionalConfig.getAll(), | ||
testFiles: [require.resolve('.')], | ||
}; | ||
} |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.