Skip to content

Commit

Permalink
Increase the time limit for the test
Browse files Browse the repository at this point in the history
  • Loading branch information
banderror committed Nov 20, 2024
1 parent eb68fb2 commit fdd0991
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,11 @@ describe('multiLineStringDiffAlgorithm', () => {
const result = multiLineStringDiffAlgorithm(mockVersions);
const endTime = performance.now();

// If the regex merge in this function takes over 500ms, this test fails
// If the regex merge in this function takes over 1 sec, this test fails
// Performance measurements: https://github.com/elastic/kibana/pull/199388
expect(endTime - startTime).toBeLessThan(500);
// NOTE: despite the fact that this test runs in ~50ms locally, on CI it
// runs slower and can be flaky even with a 500ms threshold.
expect(endTime - startTime).toBeLessThan(1000);

expect(result).toEqual(
expect.objectContaining({
Expand Down

0 comments on commit fdd0991

Please sign in to comment.