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

Refactor the nowInMillisResolution in a common place #38511

Closed
pgomulka opened this issue Feb 6, 2019 · 1 comment · Fixed by #38577
Closed

Refactor the nowInMillisResolution in a common place #38511

pgomulka opened this issue Feb 6, 2019 · 1 comment · Fixed by #38577
Labels
:Core/Infra/Core Core issues without another label >refactoring >test Issues or PRs that are addressing/adding tests v8.0.0-alpha1

Comments

@pgomulka
Copy link
Contributor

pgomulka commented Feb 6, 2019

depending on the underlying hardware and the JVM version the Clock.system(zone) can return a time with different resolution. ZonedDateTime is using that under the hood
This was changed from in jdk>8
We are already doing this in watcher, ML, sql tests. Worthy to extract in a single place.

sql https://github.com/elastic/elasticsearch/pull/36877/files
watcher #38405
ml #38506

@pgomulka pgomulka added >test Issues or PRs that are addressing/adding tests :Core/Infra/Core Core issues without another label >refactoring labels Feb 6, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@pgomulka pgomulka added the v8.0.0 label Feb 7, 2019
@pgomulka pgomulka self-assigned this Feb 7, 2019
pgomulka added a commit that referenced this issue Feb 8, 2019
In different places across the code base the ZonedDateTime in
milliseconds resolution has to be used for testing. Refactoring this to
a single place to avoid code duplication

closes #38511
closes #38581
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label >refactoring >test Issues or PRs that are addressing/adding tests v8.0.0-alpha1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants