You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/10/02 08:07:56 UTC

[GitHub] [dolphinscheduler] kezhenxu94 commented on a diff in pull request #12244: [Improvement][Test] Fully remove the usage of powermock from the whole project

kezhenxu94 commented on code in PR #12244:
URL: https://github.com/apache/dolphinscheduler/pull/12244#discussion_r985198322


##########
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/NetUtilsTest.java:
##########
@@ -30,12 +30,13 @@
 
 import org.junit.After;
 import org.junit.Test;
-import org.powermock.reflect.Whitebox;
+import org.springframework.test.util.ReflectionTestUtils;

Review Comment:
   You don't need to set that field. You can use https://github.com/stefanbirkner/system-rules to mock the system env used here https://github.com/apache/dolphinscheduler/blob/66958b91d76d1b89502ff2e041a5eb2cadfbe5ac/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java#L800.



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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