Browse Source

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
Nik Everett 5 năm trước cách đây
mục cha
commit
eb885fb1c0

+ 1 - 2
server/src/test/java/org/elasticsearch/search/aggregations/support/CoreValuesSourceTypeTests.java

@@ -57,9 +57,8 @@ public class CoreValuesSourceTypeTests extends MapperServiceTestCase {
         });
     }
 
-    @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);