InvisibleProgrammer commented on code in PR #4707: URL: https://github.com/apache/hive/pull/4707#discussion_r1337273364
########## ql/src/test/org/apache/hadoop/hive/ql/exec/util/TestRetryable.java: ########## @@ -340,7 +345,7 @@ public void testRetrySuccessSecureCallable() throws Throwable { ArgumentCaptor<PrivilegedExceptionAction> privilegedActionArgumentCaptor = ArgumentCaptor.forClass(PrivilegedExceptionAction.class); Mockito.verify(userGroupInformation, - Mockito.times(3)).doAs(privilegedActionArgumentCaptor.capture()); + Mockito.times(1)).doAs(privilegedActionArgumentCaptor.capture()); Review Comment: TBH that is a behaviour that I haven't found an answer yet: My best guess is that there is some strange behaviour with the argument captors and powermock. I remember that case from last November: when I just simple changed the test runner from PowerMockRunner to MockitoJUnitRunner, it started to provide 1 as an answer. I debugged the test and found out 1 is the correct answer. It really runs it only once. So that I reverted the change, debugged it and what I found? When I ran it with PowerMock again. the execution stopped only once. And still, the times(3) went green. I really don't know what PowerMock does in that case. And only at that test. -- 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