From 82fcb249dc02c9fbce2bc89813a7d5d188a5f34d Mon Sep 17 00:00:00 2001 From: Rudolf Meijering Date: Wed, 8 Sep 2021 17:19:27 +0200 Subject: [PATCH] Fix flaky migrations tests (#111365) (#111524) # 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); }); });