diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/incompatible_cluster_routing_allocation.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group3/incompatible_cluster_routing_allocation.test.ts index 56488f571ef16..8213c880c0fa4 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group3/incompatible_cluster_routing_allocation.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group3/incompatible_cluster_routing_allocation.test.ts @@ -121,7 +121,7 @@ describe('incompatible_cluster_routing_allocation', () => { await root.preboot(); await root.setup(); - root.start().catch(() => { + const startPromise = root.start().catch(() => { // Silent catch because the test might be done and call shutdown before starting is completed, causing unwanted thrown errors. }); @@ -165,6 +165,7 @@ describe('incompatible_cluster_routing_allocation', () => { { retryAttempts: 100, retryDelayMs: 500 } ); + await startPromise; // Wait for start phase to complete before shutting down await root.shutdown(); }); });