24a794fd6b
Test was using ClockMock#rewind passing the amount of nanoseconds in order to "strip" nanos from the time value. This was intentional as the expiration time of the UserToken doesn't have nanosecond precision. However, ClockMock#rewind doesn't support nanos either, so when it's called with a TimeValue, it rewinds the clock by the TimeValue's millis instead. This was causing the clock to go enough millis before token expiration time and the test was passing. Once every few hundred times though, the TimeValue by which we attempted to rewind the clock only had nanos and no millis, so rewind moved the clock back just a few millis, but still after expiration time. This change moves the clock explicitly to the same instant as expiration, using clock.setTime and disregarding nanos. |
||
---|---|---|
.. | ||
ccr | ||
core | ||
data-frame | ||
deprecation | ||
graph | ||
ilm | ||
logstash | ||
ml | ||
monitoring | ||
rollup | ||
security | ||
sql | ||
src/test | ||
watcher | ||
build.gradle |