forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 elastic#54540 Closes elastic#39497
- Loading branch information
Showing
2 changed files
with
61 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters