OpenSearch/x-pack/plugin/security
Ioannis Kakavas 6c19d872a0 Fix testRefreshingMultipleTimesWithinWindowSucceeds (#39701)
Previously all the threads were writing the received tokens to a
HashSet. In cases with many threads, sometimes (1 every ~25 tests)
calling size() on the HashSet returned 2 even though it seemed to
contain only one String and there was no evidence from logging that
threadSecurityClient.refreshToken() ever returned a different
access or refresh token.

This commit changes the test to use a ConcurrentHashMap instead,
checking that we only received one pair of access token/refresh token
eventually. It also adds a check so that we won't take into consideration
tokens that are returned after 30s, hence not in the concurrent refresh
time window.
2019-03-07 13:13:50 +02:00
..
cli XPack: core/ccr/Security-cli migration to java-time (#38415) 2019-02-05 22:09:32 +01:00
forbidden Migrate x-pack-elasticsearch source to elasticsearch 2018-04-20 15:29:54 -07:00
licenses Update httpclient for JDK 11 TLS engine (#37994) 2019-01-30 14:24:29 -07:00
src Fix testRefreshingMultipleTimesWithinWindowSucceeds (#39701) 2019-03-07 13:13:50 +02:00
build.gradle Split third party audit exclusions by type (#36763) 2019-01-07 17:24:19 +02:00