This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new fa2f20577a Fix unit test and remove unused import (#10113)
fa2f20577a is described below

commit fa2f20577a08a0130c5965f4847c55cba074d9ea
Author: 旺阳 <[email protected]>
AuthorDate: Thu May 19 11:25:12 2022 +0800

    Fix unit test and remove unused import (#10113)
---
 .../main/java/org/apache/dolphinscheduler/alert/AlertServer.java    | 1 -
 .../java/org/apache/dolphinscheduler/alert/AlertServerTest.java     | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git 
a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertServer.java
 
b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertServer.java
index ee9d5b3f62..6f40e676eb 100644
--- 
a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertServer.java
+++ 
b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertServer.java
@@ -31,7 +31,6 @@ import javax.annotation.PreDestroy;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.boot.WebApplicationType;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.builder.SpringApplicationBuilder;
 import org.springframework.boot.context.event.ApplicationReadyEvent;
diff --git 
a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/test/java/org/apache/dolphinscheduler/alert/AlertServerTest.java
 
b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/test/java/org/apache/dolphinscheduler/alert/AlertServerTest.java
index c37cf6fe7a..e739ff4d03 100644
--- 
a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/test/java/org/apache/dolphinscheduler/alert/AlertServerTest.java
+++ 
b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/test/java/org/apache/dolphinscheduler/alert/AlertServerTest.java
@@ -56,8 +56,8 @@ public class AlertServerTest extends TestCase {
     public void testStart() {
 
         Mockito.when(pluginDao.checkPluginDefineTableExist()).thenReturn(true);
-        
-        Mockito.when(alertConfig.getPort()).thenReturn(50053);
+
+        Mockito.when(alertConfig.getPort()).thenReturn(50052);
 
         Mockito.doNothing().when(alertSenderService).start();
 
@@ -67,7 +67,7 @@ public class AlertServerTest extends TestCase {
     
         NettyServerConfig nettyServerConfig = 
Whitebox.getInternalState(nettyRemotingServer, "serverConfig");
         
-        Assert.assertEquals(50053, nettyServerConfig.getListenPort());
+        Assert.assertEquals(50052, nettyServerConfig.getListenPort());
 
     }
 }

Reply via email to