tillrohrmann commented on a change in pull request #18158:
URL: https://github.com/apache/flink/pull/18158#discussion_r775874786



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/taskmanager/ThreadDumpInfoTest.java
##########
@@ -20,13 +20,27 @@
 
 import org.apache.flink.runtime.rest.messages.RestResponseMarshallingTestBase;
 
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import java.lang.management.LockInfo;
+import java.lang.management.MonitorInfo;
+import java.lang.management.ThreadInfo;
 import java.util.Arrays;
 import java.util.Collection;
 
 import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
+import static org.powermock.api.mockito.PowerMockito.mock;
+import static org.powermock.api.mockito.PowerMockito.when;

Review comment:
       Mockito slows the execution of tests down. Moreover, Mockito based tests 
are less maintainable in the long run. More details are here 
https://flink.apache.org/contributing/code-style-and-quality-common.html#avoid-mockito---use-reusable-test-implementations.
 I think it is ok if the test is not super sharp but more maintainable in the 
long run.




-- 
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: issues-unsubscr...@flink.apache.org

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


Reply via email to