mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[loa testing] wait 60 sec b/w simulations (#96612)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
9ec466e5a1
commit
aab675b1ba
1 changed files with 7 additions and 17 deletions
|
@ -10,6 +10,7 @@ import { resolve } from 'path';
|
||||||
import { REPO_ROOT } from '@kbn/utils';
|
import { REPO_ROOT } from '@kbn/utils';
|
||||||
import Fs from 'fs';
|
import Fs from 'fs';
|
||||||
import { createFlagError } from '@kbn/dev-utils';
|
import { createFlagError } from '@kbn/dev-utils';
|
||||||
|
import { delay } from 'bluebird';
|
||||||
import { FtrProviderContext } from './../functional/ftr_provider_context';
|
import { FtrProviderContext } from './../functional/ftr_provider_context';
|
||||||
|
|
||||||
const baseSimulationPath = 'src/test/scala/org/kibanaLoadTest/simulation';
|
const baseSimulationPath = 'src/test/scala/org/kibanaLoadTest/simulation';
|
||||||
|
@ -51,28 +52,13 @@ export async function GatlingTestRunner({ getService }: FtrProviderContext) {
|
||||||
const log = getService('log');
|
const log = getService('log');
|
||||||
|
|
||||||
await withProcRunner(log, async (procs) => {
|
await withProcRunner(log, async (procs) => {
|
||||||
await procs.run('mvn: clean compile', {
|
for (let i = 0; i < simulationClasses.length; i++) {
|
||||||
cmd: 'mvn',
|
|
||||||
args: [
|
|
||||||
'-Dmaven.wagon.http.retryHandler.count=3',
|
|
||||||
'-Dmaven.test.failure.ignore=true',
|
|
||||||
'-q',
|
|
||||||
'clean',
|
|
||||||
'compile',
|
|
||||||
],
|
|
||||||
cwd: gatlingProjectRootPath,
|
|
||||||
env: {
|
|
||||||
...process.env,
|
|
||||||
},
|
|
||||||
wait: true,
|
|
||||||
});
|
|
||||||
for (const simulationClass of simulationClasses) {
|
|
||||||
await procs.run('gatling: test', {
|
await procs.run('gatling: test', {
|
||||||
cmd: 'mvn',
|
cmd: 'mvn',
|
||||||
args: [
|
args: [
|
||||||
'gatling:test',
|
'gatling:test',
|
||||||
'-q',
|
'-q',
|
||||||
`-Dgatling.simulationClass=${simulationPackage}.${simulationClass}`,
|
`-Dgatling.simulationClass=${simulationPackage}.${simulationClasses[i]}`,
|
||||||
],
|
],
|
||||||
cwd: gatlingProjectRootPath,
|
cwd: gatlingProjectRootPath,
|
||||||
env: {
|
env: {
|
||||||
|
@ -80,6 +66,10 @@ export async function GatlingTestRunner({ getService }: FtrProviderContext) {
|
||||||
},
|
},
|
||||||
wait: true,
|
wait: true,
|
||||||
});
|
});
|
||||||
|
// wait a minute between simulations, skip for the last one
|
||||||
|
if (i < simulationClasses.length - 1) {
|
||||||
|
await delay(60 * 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue