diff --git a/x-pack/plugins/security_solution/public/management/cypress/support/data_loaders.ts b/x-pack/plugins/security_solution/public/management/cypress/support/data_loaders.ts index 93614b6dbb86d..82f9af7e114d2 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/support/data_loaders.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/support/data_loaders.ts @@ -316,9 +316,14 @@ export const dataLoadersForRealEndpoints = ( fleetServerContainerId = data?.fleetServerContainerId; }); - on('after:run', () => { + on('after:run', async () => { + const { log } = await stackServicesPromise; if (fleetServerContainerId) { - execa.sync('docker', ['kill', fleetServerContainerId]); + try { + execa.sync('docker', ['kill', fleetServerContainerId]); + } catch (error) { + log.error(error); + } } });