chinnaraolalam commented on code in PR #5303:
URL: https://github.com/apache/hive/pull/5303#discussion_r1670275889
##########
itests/hive-unit-hadoop2/src/test/java/org/apache/hadoop/hive/metastore/security/TestHadoopAuthBridge23.java:
##########
@@ -204,13 +204,22 @@ public void testDelegationTokenSharedStore() throws
Exception {
// expected
}
- // token expiration
+ // token Renewal
MyTokenStore.TOKEN_STORE.addToken(d,
new DelegationTokenInformation(0, t.getPassword()));
Assert.assertNotNull(MyTokenStore.TOKEN_STORE.getToken(d));
anotherManager.removeExpiredTokens();
+ Assert.assertTrue(MyTokenStore.TOKEN_STORE.getToken(d).getRenewDate() > 0);
Review Comment:
Its not about accessing maxtime, if maxtime is zero above statement
"removeExpiredTokens()" will remove this token. After token removed calling
getRenewDate() will throw NPE
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]