You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2022/08/23 11:54:03 UTC

[GitHub] [knox] MrtnBalazs commented on a diff in pull request #622: KNOX-2789 - Changed configuration names, removed the option to config…

MrtnBalazs commented on code in PR #622:
URL: https://github.com/apache/knox/pull/622#discussion_r952513040


##########
gateway-server/src/test/java/org/apache/knox/gateway/session/control/InMemoryConcurrentSessionVerifierTest.java:
##########
@@ -316,25 +296,27 @@ public void testBackgroundThreadRemoveExpiredTokens() throws ServiceLifecycleExc
     verifier.verifySessionForUser("admin", adminToken2);
     JWT expiringAdminToken = tokenAuthority.issueToken(expiringJwtAttributesForAdmin);
     verifier.verifySessionForUser("admin", expiringAdminToken);
-    Assert.assertEquals(3, verifier.countValidTokensForUser("admin"));
-    Thread.sleep(1100);
-    Assert.assertEquals(2, verifier.countValidTokensForUser("admin"));
+    Assert.assertEquals(3, verifier.getTokenCountForUser("admin").intValue());
+    Thread.sleep(1050);

Review Comment:
   It is for waiting until the token expires, but i realised i could just issue already expired tokens and skip the waiting. That would probably check the same functionality. I will change it that way and remove the sleep (at the other places as well)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org