vikramahuja1001 commented on code in PR #5303:
URL: https://github.com/apache/hive/pull/5303#discussion_r1668175027


##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/security/TestTokenStoreDelegationTokenSecretManager.java:
##########
@@ -99,19 +112,46 @@ private DelegationTokenIdentifier getID(String tokenStr) 
throws IOException {
 
   @Test public void testExpiry() throws IOException, InterruptedException {
     DelegationTokenStore tokenStore = new MemoryTokenStore();
-    TokenStoreDelegationTokenSecretManager mgr = createTokenMgr(tokenStore, 1);
+    TokenStoreDelegationTokenSecretManager mgr = createTokenMgr(tokenStore, 1, 
8, 2);
     try {
       mgr.startThreads();
       String tokenStr =
           
mgr.getDelegationToken(UserGroupInformation.getCurrentUser().getShortUserName(),
               UserGroupInformation.getCurrentUser().getShortUserName());
       DelegationTokenIdentifier id = getID(tokenStr);
       Assert.assertNotNull(mgr.verifyDelegationToken(tokenStr));
-      // Sleep for the renewal duration
-      Thread.sleep(1000);
-      SecretManager.InvalidToken ex = 
Assert.assertThrows(SecretManager.InvalidToken.class,
+      // Sleep for the expiration/maxlife duration duration
+      Thread.sleep(6000);
+      IllegalStateException ex = 
Assert.assertThrows(IllegalStateException.class,

Review Comment:
   done



-- 
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: gitbox-unsubscr...@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to