Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] fix flaky test with timestamp (#195681) #195695

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## Summary

It fixes the flaky test raised on elastic#195634 by adding the possibility to
pass the timestamp to the function. That helps to eliminate flakiness,
by passing the same `currentTimestamp` to both the test and the
function. Also, it's a simpler approach that doesn't require mocking
global objects or using Jest's fake timers, keeping your test
straightforward and easy to understand.

(cherry picked from commit b51ba0a)
@kibanamachine kibanamachine merged commit d9490ab into elastic:8.x Oct 10, 2024
23 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cloudSecurityPosture 506.4KB 506.4KB -12.0B

cc @opauloh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants