Fix unit test and remove unused import (#10113)

This commit is contained in:
旺阳 2022-05-19 11:25:12 +08:00 committed by GitHub
parent 844ae42ee4
commit fa2f20577a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

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

View File

@ -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());
}
}