gaborgsomogyi commented on code in PR #19372:
URL: https://github.com/apache/flink/pull/19372#discussion_r847376435


##########
flink-runtime/src/test/java/org/apache/flink/runtime/security/token/KerberosDelegationTokenManagerTest.java:
##########
@@ -79,4 +93,48 @@ public void testAllProvidersLoaded() {
         assertTrue(ExceptionThrowingDelegationTokenProvider.constructed);
         assertFalse(delegationTokenManager.isProviderLoaded("throw"));
     }
+
+    @Test
+    public void isRenewalPossibleMustGiveBackFalseByDefault() throws 
IOException {
+        UserGroupInformation ugi = 
PowerMockito.mock(UserGroupInformation.class);
+        PowerMockito.mockStatic(UserGroupInformation.class);
+        when(UserGroupInformation.getCurrentUser()).thenReturn(ugi);
+
+        ExceptionThrowingDelegationTokenProvider.enabled = false;
+        Configuration configuration = new Configuration();
+        KerberosDelegationTokenManager delegationTokenManager =
+                new KerberosDelegationTokenManager(configuration);
+
+        assertFalse(delegationTokenManager.isRenewalPossible());
+    }
+
+    @Test
+    public void isRenewalPossibleMustGiveBackTrueWhenKeytab() throws 
IOException {

Review Comment:
   Fixed.



-- 
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]

Reply via email to