Skip to content

Commit

Permalink
Fix flaky test for multiLineStringDiffAlgorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
banderror committed Dec 20, 2024
1 parent 54989a5 commit e17a280
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ describe('multiLineStringDiffAlgorithm', () => {
const result = multiLineStringDiffAlgorithm(mockVersions);
const endTime = performance.now();

// If the regex merge in this function takes over 1 sec, this test fails
// If the regex merge in this function takes over 2 sec, this test fails
// Performance measurements: https://github.com/elastic/kibana/pull/199388
// 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);
// runs ~10x slower and can be flaky even with a 1000ms threshold.
expect(endTime - startTime).toBeLessThan(2000);

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

0 comments on commit e17a280

Please sign in to comment.