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

Remove uses of Joda from xpack tests #78660

Merged
merged 6 commits into from
Oct 6, 2021
Merged

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Oct 5, 2021

Joda was deprecated internally many years ago, but there still exist
some tests that use it to format dates. This commit converts tests in
xpack that need date parsing or printing to use Java time.

Joda was deprecated internally many years ago, but there still exist
some tests that use it to format dates. This commit converts tests in
xpack that need date parsing or printing to use Java time.
@rjernst rjernst added :Core/Infra/Core Core issues without another label >refactoring v8.0.0 labels Oct 5, 2021
@rjernst rjernst requested a review from pgomulka October 5, 2021 02:05
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Oct 5, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@rjernst
Copy link
Member Author

rjernst commented Oct 5, 2021

@elasticmachine update branch

Copy link
Contributor

@pgomulka pgomulka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left one comment. No need for another review

@@ -137,7 +137,7 @@ public void testSimpleDateHisto() throws Exception {
"the_histo.date_histogram._count",
2,
"the_histo.date_histogram.time_zone",
DateTimeZone.UTC.toString(),
"UTC", // TODO: the default is hardcoded from Joda, we should change this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe java.time.ZoneId.of("UTC").toString?

Copy link
Contributor

@ChrisHegarty ChrisHegarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rjernst rjernst merged commit 57a501c into elastic:master Oct 6, 2021
@rjernst rjernst deleted the joda/removal3 branch October 6, 2021 16:59
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
7.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 78660

rjernst added a commit to rjernst/elasticsearch that referenced this pull request Oct 6, 2021
Joda was deprecated internally many years ago, but there still exist
some tests that use it to format dates. This commit converts tests in
xpack that need date parsing or printing to use Java time.
elasticsearchmachine pushed a commit that referenced this pull request Oct 7, 2021
* Remove uses of Joda from xpack tests (#78660)

Joda was deprecated internally many years ago, but there still exist
some tests that use it to format dates. This commit converts tests in
xpack that need date parsing or printing to use Java time.

* fix compile

* checkstyle

Co-authored-by: Elastic Machine <[email protected]>
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 Team:Core/Infra Meta label for core/infra team v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants