forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix flaky test for task state validation (elastic#163744)
Fixes elastic#161081. In this PR, I'm attempting to reduce the flakiness of the `task_state_validation.test.ts` jest integration test by doing the following changes: - Ensuring each test creates a task with a different ID in case there is a race condition with the previous test that would delete the task as the next test runs. - Modifying how the test waits for the task runner to be called given the previous approach wasn't 100% that the executor would be mocked before the task is scheduled. Since the flaky test runner doesn't work with jest integration tests, I instead added a for loop in my code to run the test 25x, and made CI run it a few times: - Commits creating for loop and setting to 25: elastic@78561fe and elastic@7168537 - Commits where CI ran 25x and succeeded: elastic@fef05d7, elastic@f3b2a90, elastic@7415c93, and elastic@74bce2a --------- Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
1 parent
643ead4
commit 42964d0
Showing
1 changed file
with
48 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters