zuston commented on a change in pull request #18158: URL: https://github.com/apache/flink/pull/18158#discussion_r775882378
########## 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: Got it. Thanks @tillrohrmann for pointing this. But in this case, If using the `currentThread`, i can't simulate the different stacktrace depth. So the test cases are insufficient. -- 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