zhongjiajie commented on code in PR #12017:
URL: https://github.com/apache/dolphinscheduler/pull/12017#discussion_r980858238


##########
dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker:
##########
@@ -0,0 +1 @@
+mock-maker-inline

Review Comment:
   Add this to mock finial class, according to 
https://github.com/mockito/mockito/wiki/What%27s-new-in-Mockito-2#mock-the-unmockable-opt-in-mocking-of-final-classesmethods



##########
dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-http/src/test/java/org/apache/dolphinscheduler/plugin/alert/http/HttpSenderTest.java:
##########
@@ -28,14 +33,16 @@
 public class HttpSenderTest {
 
     @Test
-    public void sendTest() {
+    public void sendTest() throws IOException {
         Map<String, String> paramsMap = new HashMap<>();
-        paramsMap.put(HttpAlertConstants.NAME_URL, "http://www.baidu.com";);
+        paramsMap.put(HttpAlertConstants.NAME_URL, 
"http://www.dolphinscheduler-not-exists-web.com";);
         paramsMap.put(HttpAlertConstants.NAME_REQUEST_TYPE, "POST");
         paramsMap.put(HttpAlertConstants.NAME_HEADER_PARAMS, 
"{\"Content-Type\":\"application/json\"}");
-        paramsMap.put(HttpAlertConstants.NAME_BODY_PARAMS, 
"{\"number\":\"13457654323\"}");

Review Comment:
   remove some sensitive data in UT



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