Skip to content

Commit

Permalink
Use better date in test
Browse files Browse the repository at this point in the history
Dates less than `10000` can be interpreted as years instead of millis
since epoch. Both in queries and when parsing dates. This makes sure
that one of our tests doesn't use these confusing dates.....

Closes #63969
Relates to #63692
  • Loading branch information
nik9000 committed Oct 22, 2020
1 parent 3f8097b commit eb885fb
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ public void testDatePrepareRoundingWithNothing() throws IOException {
});
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/63969")
public void testDatePrepareRoundingWithDocs() throws IOException {
long min = randomLongBetween(0, 1000000);
long min = randomLongBetween(100000, 1000000); // The minimum has to be fairly large or we might accidentally think its a year....
long max = randomLongBetween(min + 1, 100000000000L);
withAggregationContext(dateMapperService(), docsWithDatesBetween(min, max), context -> {
Rounding rounding = mock(Rounding.class);
Expand Down

0 comments on commit eb885fb

Please sign in to comment.