mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2026-10-12 09:24:52 -05:00
The ISO forms of LocalTime and LocalDateTime omit the seconds field when the second is 00, so currentTime(), currentDateTime(), currentTimeInZone() and millisToDateTime() each returned a shorter string once a minute — HH:mm instead of HH:mm:ss. That failed testCurrentTime in CI roughly one run in sixty, and silently handed workloads a differently-shaped timestamp the rest of the time. Each now formats with an explicit pattern rather than toString(), which also makes the truncatedTo(SECONDS) calls redundant. The new test pins the boundary through millisToDateTime, whose instant comes from the caller: the wall-clock functions can only be asserted for shape, which catches this one second in sixty. It builds a timestamp on a whole minute, requires the seconds to be there, and repeats at second 30 so a fix in the other direction is caught too.