-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Improve reproducability of HistoryIntegrationTests #38520
Comments
Pinging @elastic/es-core-features |
there is much more which that are covering code using |
Also worth noting that for watcher tests this can be solved easier as there is already a mechanism to mocking clock from |
This was also discussed on core-infra meeting on 13th Feb. The conclusion is to focus on one specific use case where the clock can be mocked. |
@pgomulka I'm just going through some open issues of mine. Do you think its useful to keep this one open? The general goal of mocking clock to make tests reproducable seems clear, but there seems no clear definition on when this goal is reached, so IMHO having this task sit here doesn't add much value for us. I wouldn't mind closing if you agree. |
totally agree - let's close it |
While fixing and issue in HistoryIntegrationTests#testThatHistoryContainsStatus in #38505 it became clear that the initial issue wasn't reproducible using just the random test seed because it uses some current System time via the ClockMock. Ideally we should be able to reproduce issues by supplying just the test seed when re-running the test.
I'd like open this issue to investigate ideas and the feasability to improve this, maybe only for HistoryIntegrationTests but also maybe more generally for other Watcher or time-dependent tests.
Maybe this isn't possible for HistoryIntegrationTests because the nature of the things tested require some sort of advancing clock, but maybe parts of it can be controlled by a reproducible random source. See #38505 (comment) for some more context.
The text was updated successfully, but these errors were encountered: