OpenSearch/x-pack
Ioannis Kakavas 24a794fd6b Fix testTokenExpiry flaky test (#42585)
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.
2019-05-30 07:53:56 +03:00
..
dev-tools Build: Merge xpack checkstyle config into core (#33399) 2018-09-05 09:17:02 -04:00
docs TestClusters: Convert docs (#42100) 2019-05-22 14:44:08 +03:00
license-tools Switch mapping/aggregations over to java time (#36363) 2019-01-23 10:40:05 +01:00
plugin Fix testTokenExpiry flaky test (#42585) 2019-05-30 07:53:56 +03:00
qa Re-mute all ml_datafeed_crud rolling upgrade tests 2019-05-23 09:50:27 -04:00
test Add an OpenID Connect authentication realm (#40674) (#41178) 2019-04-15 12:41:16 +03:00
transport-client Upgrade hamcrest to 2.1 (#41464) 2019-04-24 23:40:03 -07:00
NOTICE.txt Migrate x-pack-elasticsearch source to elasticsearch 2018-04-20 15:29:54 -07:00
README.md Reorganize license files 2018-04-20 15:33:59 -07:00
build.gradle Remove Migration Upgrade and Assistance APIs (#40075) 2019-03-18 13:46:56 -06:00

README.md

Elastic License Functionality

This directory tree contains files subject to the Elastic License. The files subject to the Elastic License are grouped in this directory to clearly separate them from files licensed under the Apache License 2.0.