From 98dbcaff75d657c945ec1d0f2a7a9878bb58ab68 Mon Sep 17 00:00:00 2001 From: Kawika Avilla Date: Thu, 10 Mar 2022 09:56:59 +0000 Subject: [PATCH] [Tests] fix JUnit Reporter test Interesting flakiness in the test. After the jest upgrade, our tests got more performant. The JUnit Report integ test was actually expecting `anything` for a field `time`. This `time` was calculated on elapsed time to the `0.00x` value anything faster would actually be undefined and at that point `anything` fails because `anything` cannot be undefined. tl;dr: This test became flakey because our tests now run too fast. Signed-off-by: Kawika Avilla --- src/dev/jest/integration_tests/__fixtures__/test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dev/jest/integration_tests/__fixtures__/test.js b/src/dev/jest/integration_tests/__fixtures__/test.js index 4010846a5b71..cec71e2c38f3 100644 --- a/src/dev/jest/integration_tests/__fixtures__/test.js +++ b/src/dev/jest/integration_tests/__fixtures__/test.js @@ -30,6 +30,9 @@ * GitHub history for details. */ -it('fails', () => { +it('fails', (done) => { + setTimeout(() => { + done(); + }, 200); throw new Error('failure'); });