From 89b7139dc314087287266a976c1dd20accb6f776 Mon Sep 17 00:00:00 2001 From: lmccay Date: Fri, 11 Oct 2024 15:36:24 -0400 Subject: [PATCH] Knox 3069 (#939) * KNOX-3069 - add a sleep to ensure uniqueness --- .../gateway/service/knoxtoken/TokenServiceResourceTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gateway-service-knoxtoken/src/test/java/org/apache/knox/gateway/service/knoxtoken/TokenServiceResourceTest.java b/gateway-service-knoxtoken/src/test/java/org/apache/knox/gateway/service/knoxtoken/TokenServiceResourceTest.java index dc68117b6..b3cd6b38c 100644 --- a/gateway-service-knoxtoken/src/test/java/org/apache/knox/gateway/service/knoxtoken/TokenServiceResourceTest.java +++ b/gateway-service-knoxtoken/src/test/java/org/apache/knox/gateway/service/knoxtoken/TokenServiceResourceTest.java @@ -1143,6 +1143,8 @@ private void testLimitingTokensPerUser(int configuredLimit, int numberOfTokens, assertNotNull("TokenID should not be null", tokenId); assertFalse("TokenID must be unique", tokenIDs.contains(tokenId)); tokenIDs.add(tokenId); + + Thread.sleep(5); } final Response getKnoxTokensResponse = getUserTokensResponse(tr); final Collection tokens = ((Map>) JsonUtils.getObjectFromJsonString(getKnoxTokensResponse.getEntity().toString()))