From e5e312510fa8d59b3799e968aff64877987bf092 Mon Sep 17 00:00:00 2001 From: Rudolf Meijering Date: Tue, 7 Sep 2021 15:49:51 +0200 Subject: [PATCH] Fix flaky migrations tests (#111365) # Conflicts: # src/core/server/saved_objects/migrationsv2/integration_tests/batch_size_bytes.test.ts --- .../saved_objects/migrationsv2/test_helpers/retry.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/server/saved_objects/migrationsv2/test_helpers/retry.test.ts b/src/core/server/saved_objects/migrationsv2/test_helpers/retry.test.ts index 246f61c71ae4d..8294a61caae6e 100644 --- a/src/core/server/saved_objects/migrationsv2/test_helpers/retry.test.ts +++ b/src/core/server/saved_objects/migrationsv2/test_helpers/retry.test.ts @@ -52,6 +52,8 @@ describe('retry', () => { }, { retryAttempts: 3, retryDelayMs: 100 } ); - expect(Date.now() - now).toBeGreaterThanOrEqual(200); + // Would expect it to take 200ms but seems like timing inaccuracies + // sometimes causes the duration to be measured as 199ms + expect(Date.now() - now).toBeGreaterThanOrEqual(199); }); });