OpenSearch/server
Nik Everett 195345b09e
Fix InternalAutoDateHistogramTests (#54602) (#54687)
The test had errors around time units that have different length - think
leap years or months that aren't 30 days. This fixes those errors. In
the proces I've changed a bunch of things to debug the problem:

* Replace `currentTimeMillis` with a random time. Now the test fails
  randomly! Wonderful. Much better than on random days of the month.
* Generate buckets "closer together" to test random reduction. Without
  this we were super frequently getting stuck in the "year of century"
  rounding because *some* of the of the buckets we built were far apart.
  This generates a much greater variety of tests.
* Implement `toString` on `RoundingInfo` so I can debug without going
  crazy.
* Switch keys in the bucket assertions from epoch millis to `Instant`s
  so we can read the failures.

Closes #54540
Closes #39497
2020-04-03 08:22:08 -04:00
..
licenses Upgrade to lucene 8.5.0 release (#54077) 2020-03-24 13:45:50 +00:00
src Fix InternalAutoDateHistogramTests (#54602) (#54687) 2020-04-03 08:22:08 -04:00
build.gradle Bump multi-release JARs to Java 11 2020-03-31 06:48:46 -05:00