Skip to content

Commit 2b0d4bc

Browse files
committed
Use better date in test
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
1 parent db34ded commit 2b0d4bc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/src/test/java/org/elasticsearch/search/aggregations/support/CoreValuesSourceTypeTests.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ public void testDatePrepareRoundingWithNothing() throws IOException {
5757
});
5858
}
5959

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

0 commit comments

Comments
 (0)