mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Ensure es/kibana cleanup always happens when using scripts/functional_tests (#48986)
This commit is contained in:
parent
500cf271b0
commit
d68eba6d96
1 changed files with 14 additions and 6 deletions
|
@ -82,12 +82,20 @@ export async function runTests(options) {
|
|||
await withProcRunner(log, async procs => {
|
||||
const config = await readConfigFile(log, configPath);
|
||||
|
||||
const es = await runElasticsearch({ config, options: opts });
|
||||
await runKibanaServer({ procs, config, options: opts });
|
||||
await runFtr({ configPath, options: opts });
|
||||
|
||||
await procs.stop('kibana');
|
||||
await es.cleanup();
|
||||
let es;
|
||||
try {
|
||||
es = await runElasticsearch({ config, options: opts });
|
||||
await runKibanaServer({ procs, config, options: opts });
|
||||
await runFtr({ configPath, options: opts });
|
||||
} finally {
|
||||
try {
|
||||
await procs.stop('kibana');
|
||||
} finally {
|
||||
if (es) {
|
||||
await es.cleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue