diff --git a/.gitignore b/.gitignore index b47f59ded..cf4b56953 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ .project .settings target -.project .idea .vscode .DS_Store diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java b/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java index e82c7202d..06cb467da 100644 --- a/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java +++ b/api/src/main/java/com/alibaba/nacos/api/naming/NamingService.java @@ -19,12 +19,10 @@ import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.api.naming.listener.EventListener; import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.pojo.ListView; -import com.alibaba.nacos.api.naming.pojo.Service; import com.alibaba.nacos.api.naming.pojo.ServiceInfo; import com.alibaba.nacos.api.selector.AbstractSelector; import java.util.List; -import java.util.Map; /** * Naming Service diff --git a/api/src/main/java/com/alibaba/nacos/api/naming/pojo/Instance.java b/api/src/main/java/com/alibaba/nacos/api/naming/pojo/Instance.java index a4ea0484b..ea097cb90 100644 --- a/api/src/main/java/com/alibaba/nacos/api/naming/pojo/Instance.java +++ b/api/src/main/java/com/alibaba/nacos/api/naming/pojo/Instance.java @@ -16,7 +16,6 @@ package com.alibaba.nacos.api.naming.pojo; import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.annotation.JSONField; import java.util.HashMap; import java.util.Map; diff --git a/client/src/main/java/com/alibaba/nacos/client/config/NacosConfigService.java b/client/src/main/java/com/alibaba/nacos/client/config/NacosConfigService.java index a6ce0c79c..69ebd8311 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/NacosConfigService.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/NacosConfigService.java @@ -27,7 +27,6 @@ import com.alibaba.nacos.client.config.filter.impl.ConfigResponse; import com.alibaba.nacos.client.config.http.HttpAgent; import com.alibaba.nacos.client.config.http.MetricsHttpAgent; import com.alibaba.nacos.client.config.http.ServerHttpAgent; -import com.alibaba.nacos.client.config.impl.CacheData; import com.alibaba.nacos.client.config.impl.ClientWorker; import com.alibaba.nacos.client.config.impl.HttpSimpleClient.HttpResult; import com.alibaba.nacos.client.config.impl.LocalConfigInfoProcessor; diff --git a/client/src/test/java/com/alibaba/nacos/client/NamingTest.java b/client/src/test/java/com/alibaba/nacos/client/NamingTest.java index fdab46e5d..56c3590f7 100644 --- a/client/src/test/java/com/alibaba/nacos/client/NamingTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/NamingTest.java @@ -17,11 +17,9 @@ package com.alibaba.nacos.client; import com.alibaba.nacos.api.NacosFactory; import com.alibaba.nacos.api.PropertyKeyConst; -import com.alibaba.nacos.api.common.Constants; import com.alibaba.nacos.api.naming.NamingService; import com.alibaba.nacos.api.naming.pojo.Instance; -import com.alibaba.nacos.api.naming.pojo.ListView; -import com.alibaba.nacos.api.selector.ExpressionSelector; + import org.junit.Ignore; import org.junit.Test; diff --git a/config/src/main/java/com/alibaba/nacos/config/server/monitor/MemoryMonitor.java b/config/src/main/java/com/alibaba/nacos/config/server/monitor/MemoryMonitor.java index b347caf41..a0341e8bf 100755 --- a/config/src/main/java/com/alibaba/nacos/config/server/monitor/MemoryMonitor.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/monitor/MemoryMonitor.java @@ -25,7 +25,6 @@ import org.springframework.stereotype.Service; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; import static com.alibaba.nacos.config.server.utils.LogUtil.memoryLog; diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/DiskServiceUnitTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/DiskServiceUnitTest.java index 96e79c2af..fe5e0bc7f 100755 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/DiskServiceUnitTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/DiskServiceUnitTest.java @@ -22,7 +22,6 @@ import org.junit.runner.RunWith; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; -import javax.servlet.ServletContext; import java.io.File; import java.io.IOException; diff --git a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpServiceTest.java b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpServiceTest.java index 43b35a1fd..fc235d974 100644 --- a/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpServiceTest.java +++ b/config/src/test/java/com/alibaba/nacos/config/server/service/dump/DumpServiceTest.java @@ -7,8 +7,6 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; -import static org.junit.Assert.*; - @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest @WebAppConfiguration diff --git a/console/src/main/java/com/alibaba/nacos/console/controller/AuthController.java b/console/src/main/java/com/alibaba/nacos/console/controller/AuthController.java index edc3ba5f4..d8fd4dc32 100644 --- a/console/src/main/java/com/alibaba/nacos/console/controller/AuthController.java +++ b/console/src/main/java/com/alibaba/nacos/console/controller/AuthController.java @@ -18,8 +18,7 @@ package com.alibaba.nacos.console.controller; import com.alibaba.nacos.console.config.WebSecurityConfig; import com.alibaba.nacos.config.server.model.RestResult; import com.alibaba.nacos.console.utils.JwtTokenUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.BadCredentialsException; diff --git a/console/src/main/resources/static/console-fe/test/install.sh b/console/src/main/resources/static/console-fe/test/install.sh index 67759d807..de512234d 100644 --- a/console/src/main/resources/static/console-fe/test/install.sh +++ b/console/src/main/resources/static/console-fe/test/install.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash ls ~/nvm || git clone https://github.com/creationix/nvm.git ~/nvm source ~/nvm/nvm.sh nvm install v7.10.0 diff --git a/naming/src/main/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/DistroConsistencyServiceImpl.java b/naming/src/main/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/DistroConsistencyServiceImpl.java index bc21a482c..65448e8a0 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/DistroConsistencyServiceImpl.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/DistroConsistencyServiceImpl.java @@ -19,7 +19,6 @@ import com.alibaba.nacos.api.common.Constants; import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.core.utils.SystemUtils; import com.alibaba.nacos.naming.cluster.ServerListManager; -import com.alibaba.nacos.naming.cluster.ServerMode; import com.alibaba.nacos.naming.cluster.ServerStatus; import com.alibaba.nacos.naming.cluster.servers.Server; import com.alibaba.nacos.naming.cluster.transport.Serializer; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/ClusterController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/ClusterController.java index b8218ce51..8e2e0948c 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/ClusterController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/ClusterController.java @@ -16,14 +16,11 @@ package com.alibaba.nacos.naming.controllers; import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.alibaba.nacos.api.common.Constants; import com.alibaba.nacos.api.naming.CommonParams; import com.alibaba.nacos.api.naming.pojo.AbstractHealthChecker; import com.alibaba.nacos.core.utils.WebUtils; -import com.alibaba.nacos.naming.consistency.persistent.raft.RaftPeer; -import com.alibaba.nacos.naming.consistency.persistent.raft.RaftPeerSet; import com.alibaba.nacos.naming.core.Cluster; import com.alibaba.nacos.naming.core.Service; import com.alibaba.nacos.naming.core.ServiceManager; @@ -31,8 +28,7 @@ import com.alibaba.nacos.naming.exception.NacosException; import com.alibaba.nacos.naming.healthcheck.HealthCheckType; import com.alibaba.nacos.naming.misc.Loggers; import com.alibaba.nacos.naming.misc.UtilsAndCommons; -import com.alibaba.nacos.naming.pojo.ClusterStateView; -import org.apache.commons.collections.CollectionUtils; + import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; @@ -42,9 +38,6 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; /** * @author nkorange diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/DistroController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/DistroController.java index 058dd273c..827a9c784 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/DistroController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/DistroController.java @@ -18,7 +18,6 @@ package com.alibaba.nacos.naming.controllers; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.alibaba.nacos.core.utils.WebUtils; -import com.alibaba.nacos.naming.cluster.ServerMode; import com.alibaba.nacos.naming.cluster.transport.Serializer; import com.alibaba.nacos.naming.consistency.Datum; import com.alibaba.nacos.naming.consistency.KeyBuilder; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/InstanceController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/InstanceController.java index d4c75026f..af4b38e2f 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/InstanceController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/InstanceController.java @@ -22,7 +22,6 @@ import com.alibaba.nacos.api.common.Constants; import com.alibaba.nacos.api.naming.CommonParams; import com.alibaba.nacos.api.naming.utils.NamingUtils; import com.alibaba.nacos.core.utils.WebUtils; -import com.alibaba.nacos.naming.cluster.ServerMode; import com.alibaba.nacos.naming.core.DistroMapper; import com.alibaba.nacos.naming.core.Instance; import com.alibaba.nacos.naming.core.Service; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/controllers/OperatorController.java b/naming/src/main/java/com/alibaba/nacos/naming/controllers/OperatorController.java index f1c968e50..5de6e4d54 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/controllers/OperatorController.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/controllers/OperatorController.java @@ -39,7 +39,6 @@ import com.alibaba.nacos.naming.web.NeedAuth; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/SubscribeManager.java b/naming/src/main/java/com/alibaba/nacos/naming/core/SubscribeManager.java index 5eb5a686f..223f583af 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/SubscribeManager.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/core/SubscribeManager.java @@ -21,7 +21,6 @@ import com.alibaba.nacos.naming.boot.RunningConfig; import com.alibaba.nacos.naming.cluster.ServerListManager; import com.alibaba.nacos.naming.cluster.servers.Server; import com.alibaba.nacos.naming.misc.HttpClient; -import com.alibaba.nacos.naming.misc.Loggers; import com.alibaba.nacos.naming.misc.NetUtils; import com.alibaba.nacos.naming.misc.UtilsAndCommons; import com.alibaba.nacos.naming.pojo.Subscriber; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/JsonAdapter.java b/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/JsonAdapter.java index 8f64b1cec..3a756d28a 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/JsonAdapter.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/JsonAdapter.java @@ -23,7 +23,6 @@ import com.alibaba.fastjson.serializer.JSONSerializer; import com.alibaba.fastjson.serializer.ObjectSerializer; import com.alibaba.fastjson.serializer.SerializeWriter; import com.alibaba.nacos.api.naming.pojo.AbstractHealthChecker; -import org.apache.commons.lang3.StringUtils; import java.io.IOException; import java.lang.reflect.Type; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/TcpSuperSenseProcessor.java b/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/TcpSuperSenseProcessor.java index f33859ea0..3c63d5e3e 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/TcpSuperSenseProcessor.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/TcpSuperSenseProcessor.java @@ -17,7 +17,6 @@ package com.alibaba.nacos.naming.healthcheck; import com.alibaba.nacos.naming.core.Cluster; import com.alibaba.nacos.naming.core.Instance; -import com.alibaba.nacos.naming.core.Service; import com.alibaba.nacos.naming.misc.Loggers; import com.alibaba.nacos.naming.misc.SwitchDomain; import com.alibaba.nacos.naming.monitor.MetricsMonitor; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/misc/HttpClient.java b/naming/src/main/java/com/alibaba/nacos/naming/misc/HttpClient.java index 856518dbc..21dd71f78 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/misc/HttpClient.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/misc/HttpClient.java @@ -19,7 +19,6 @@ import com.alibaba.nacos.common.util.HttpMethod; import com.ning.http.client.AsyncCompletionHandler; import com.ning.http.client.AsyncHttpClient; import com.ning.http.client.AsyncHttpClientConfig; -import com.ning.http.client.FluentStringsMap; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; import org.apache.commons.io.IOUtils; @@ -28,7 +27,6 @@ import org.apache.http.*; import org.apache.http.client.config.RequestConfig; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; -import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; import org.apache.http.entity.ContentType; @@ -36,7 +34,6 @@ import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.client.HttpClients; -import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.message.BasicNameValuePair; import java.io.IOException; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/misc/NamingProxy.java b/naming/src/main/java/com/alibaba/nacos/naming/misc/NamingProxy.java index e98795854..5c90da8ea 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/misc/NamingProxy.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/misc/NamingProxy.java @@ -16,7 +16,6 @@ package com.alibaba.nacos.naming.misc; import com.alibaba.fastjson.JSON; -import com.alibaba.nacos.core.utils.SystemUtils; import com.alibaba.nacos.naming.boot.RunningConfig; import com.ning.http.client.AsyncCompletionHandler; import com.ning.http.client.Response; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/web/AuthFilter.java b/naming/src/main/java/com/alibaba/nacos/naming/web/AuthFilter.java index 6e321980e..696f807d8 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/web/AuthFilter.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/web/AuthFilter.java @@ -16,11 +16,9 @@ package com.alibaba.nacos.naming.web; import com.alibaba.nacos.naming.acl.AuthChecker; -import com.alibaba.nacos.naming.controllers.*; -import com.alibaba.nacos.naming.exception.NacosException; import com.alibaba.nacos.naming.misc.SwitchDomain; import com.alibaba.nacos.naming.misc.UtilsAndCommons; -import org.apache.commons.lang3.StringUtils; + import org.springframework.beans.factory.annotation.Autowired; import javax.servlet.*; @@ -30,8 +28,6 @@ import java.io.IOException; import java.lang.reflect.Method; import java.net.URI; import java.security.AccessControlException; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; /** * @author nkorange diff --git a/naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java b/naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java index 0c83a3d2a..78b51e138 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/web/DistroFilter.java @@ -17,7 +17,6 @@ package com.alibaba.nacos.naming.web; import com.alibaba.nacos.api.common.Constants; import com.alibaba.nacos.api.naming.CommonParams; -import com.alibaba.nacos.naming.boot.SpringContext; import com.alibaba.nacos.naming.core.DistroMapper; import com.alibaba.nacos.naming.misc.HttpClient; import com.alibaba.nacos.naming.misc.Loggers; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/web/TrafficReviseFilter.java b/naming/src/main/java/com/alibaba/nacos/naming/web/TrafficReviseFilter.java index 6ecf30879..8ba69b551 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/web/TrafficReviseFilter.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/web/TrafficReviseFilter.java @@ -16,7 +16,6 @@ package com.alibaba.nacos.naming.web; import com.alibaba.nacos.common.util.HttpMethod; -import com.alibaba.nacos.naming.cluster.ServerMode; import com.alibaba.nacos.naming.cluster.ServerStatus; import com.alibaba.nacos.naming.cluster.ServerStatusManager; import com.alibaba.nacos.naming.misc.SwitchDomain; @@ -28,8 +27,6 @@ import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; import java.util.Map; /** diff --git a/naming/src/test/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/TaskDispatcherTest.java b/naming/src/test/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/TaskDispatcherTest.java index 1bd2a52ae..e068ce236 100644 --- a/naming/src/test/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/TaskDispatcherTest.java +++ b/naming/src/test/java/com/alibaba/nacos/naming/consistency/ephemeral/distro/TaskDispatcherTest.java @@ -16,7 +16,7 @@ package com.alibaba.nacos.naming.consistency.ephemeral.distro; import com.alibaba.nacos.naming.misc.GlobalConfig; -import com.alibaba.nacos.naming.misc.Loggers; + import org.junit.Before; import org.junit.Test; import org.springframework.test.util.ReflectionTestUtils; diff --git a/naming/src/test/java/com/alibaba/nacos/naming/core/DomainTest.java b/naming/src/test/java/com/alibaba/nacos/naming/core/DomainTest.java index 855a731b3..68b363bd1 100644 --- a/naming/src/test/java/com/alibaba/nacos/naming/core/DomainTest.java +++ b/naming/src/test/java/com/alibaba/nacos/naming/core/DomainTest.java @@ -16,8 +16,6 @@ package com.alibaba.nacos.naming.core; import com.alibaba.nacos.naming.boot.SpringContext; -import com.alibaba.nacos.naming.healthcheck.HealthCheckProcessorDelegate; -import com.alibaba.nacos.naming.misc.SwitchDomain; import com.alibaba.nacos.naming.misc.UtilsAndCommons; import com.alibaba.nacos.naming.push.PushService; import org.junit.Assert; diff --git a/test/src/test/java/com/alibaba/nacos/test/naming/CPInstancesAPI_ITCase.java b/test/src/test/java/com/alibaba/nacos/test/naming/CPInstancesAPI_ITCase.java index c66afd79a..b728018a1 100644 --- a/test/src/test/java/com/alibaba/nacos/test/naming/CPInstancesAPI_ITCase.java +++ b/test/src/test/java/com/alibaba/nacos/test/naming/CPInstancesAPI_ITCase.java @@ -20,20 +20,14 @@ import java.util.List; import java.util.Properties; import java.util.concurrent.TimeUnit; -import javax.swing.text.View; - import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.alibaba.nacos.api.PropertyKeyConst; import com.alibaba.nacos.api.common.Constants; -import com.alibaba.nacos.api.naming.CommonParams; import com.alibaba.nacos.api.naming.NamingFactory; import com.alibaba.nacos.api.naming.NamingService; import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.pojo.ListView; -import com.alibaba.nacos.config.server.utils.TimeUtils; -import com.alibaba.nacos.config.server.utils.TimeoutUtils; import com.alibaba.nacos.naming.NamingApp; import org.junit.After; @@ -54,8 +48,6 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.util.UriComponentsBuilder; import static com.alibaba.nacos.test.naming.NamingBase.*; -import static org.junit.Assert.assertTrue; - /** * @author nkorange */ diff --git a/test/src/test/java/com/alibaba/nacos/test/naming/Cmdb_ITCase.java b/test/src/test/java/com/alibaba/nacos/test/naming/Cmdb_ITCase.java index 35c947d72..ec1889b00 100644 --- a/test/src/test/java/com/alibaba/nacos/test/naming/Cmdb_ITCase.java +++ b/test/src/test/java/com/alibaba/nacos/test/naming/Cmdb_ITCase.java @@ -46,9 +46,7 @@ import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.MultiValueMap; import org.springframework.web.util.UriComponentsBuilder; -import static com.alibaba.nacos.client.naming.net.HttpClient.request; import static com.alibaba.nacos.test.naming.NamingBase.*; -import static com.alibaba.nacos.test.naming.NamingBase.randomDomainName; @RunWith(SpringRunner.class) @SpringBootTest(classes = NamingApp.class, properties = {"server.servlet.context-path=/nacos", diff --git a/test/src/test/java/com/alibaba/nacos/test/naming/DeregisterInstance_ITCase.java b/test/src/test/java/com/alibaba/nacos/test/naming/DeregisterInstance_ITCase.java index 2493e4fa9..e88729082 100644 --- a/test/src/test/java/com/alibaba/nacos/test/naming/DeregisterInstance_ITCase.java +++ b/test/src/test/java/com/alibaba/nacos/test/naming/DeregisterInstance_ITCase.java @@ -25,7 +25,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.web.server.LocalServerPort; -import org.springframework.test.annotation.Repeat; import org.springframework.test.context.junit4.SpringRunner; import java.util.Arrays; diff --git a/test/src/test/java/com/alibaba/nacos/test/naming/MultiTenant_ITCase.java b/test/src/test/java/com/alibaba/nacos/test/naming/MultiTenant_ITCase.java index cddb02aa3..979865e8b 100644 --- a/test/src/test/java/com/alibaba/nacos/test/naming/MultiTenant_ITCase.java +++ b/test/src/test/java/com/alibaba/nacos/test/naming/MultiTenant_ITCase.java @@ -16,7 +16,6 @@ import com.alibaba.nacos.api.naming.listener.NamingEvent; import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.api.naming.pojo.ListView; import com.alibaba.nacos.naming.NamingApp; -import com.alibaba.nacos.naming.selector.Selector; import org.junit.Assert; import org.junit.Before; diff --git a/test/src/test/java/com/alibaba/nacos/test/naming/MultiTenant_InstanceAPI_ITCase.java b/test/src/test/java/com/alibaba/nacos/test/naming/MultiTenant_InstanceAPI_ITCase.java index 15f0a7e66..c1ecc0991 100644 --- a/test/src/test/java/com/alibaba/nacos/test/naming/MultiTenant_InstanceAPI_ITCase.java +++ b/test/src/test/java/com/alibaba/nacos/test/naming/MultiTenant_InstanceAPI_ITCase.java @@ -1,7 +1,6 @@ package com.alibaba.nacos.test.naming; import java.net.URL; -import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Properties; @@ -13,11 +12,7 @@ import com.alibaba.nacos.api.PropertyKeyConst; import com.alibaba.nacos.api.common.Constants; import com.alibaba.nacos.api.naming.NamingFactory; import com.alibaba.nacos.api.naming.NamingService; -import com.alibaba.nacos.api.naming.listener.Event; -import com.alibaba.nacos.api.naming.listener.EventListener; -import com.alibaba.nacos.api.naming.listener.NamingEvent; import com.alibaba.nacos.api.naming.pojo.Instance; -import com.alibaba.nacos.api.naming.pojo.ListView; import com.alibaba.nacos.client.naming.NacosNamingService; import com.alibaba.nacos.naming.NamingApp; diff --git a/test/src/test/java/com/alibaba/nacos/test/naming/SelectOneHealthyInstance_ITCase.java b/test/src/test/java/com/alibaba/nacos/test/naming/SelectOneHealthyInstance_ITCase.java index 4291aff02..e95dd3fbf 100644 --- a/test/src/test/java/com/alibaba/nacos/test/naming/SelectOneHealthyInstance_ITCase.java +++ b/test/src/test/java/com/alibaba/nacos/test/naming/SelectOneHealthyInstance_ITCase.java @@ -19,7 +19,7 @@ import com.alibaba.nacos.api.naming.NamingFactory; import com.alibaba.nacos.api.naming.NamingService; import com.alibaba.nacos.api.naming.pojo.Instance; import com.alibaba.nacos.naming.NamingApp; -import org.junit.After; + import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -28,7 +28,6 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.test.context.junit4.SpringRunner; -import java.net.ServerSocket; import java.util.Arrays; import java.util.List; import java.util.concurrent.TimeUnit; diff --git a/test/src/test/java/com/alibaba/nacos/test/naming/Unsubscribe_ITCase.java b/test/src/test/java/com/alibaba/nacos/test/naming/Unsubscribe_ITCase.java index f0d020581..917e88390 100644 --- a/test/src/test/java/com/alibaba/nacos/test/naming/Unsubscribe_ITCase.java +++ b/test/src/test/java/com/alibaba/nacos/test/naming/Unsubscribe_ITCase.java @@ -33,7 +33,6 @@ import org.springframework.test.context.junit4.SpringRunner; import java.util.Arrays; import java.util.Collections; import java.util.List; -import java.util.concurrent.TimeUnit; import static com.alibaba.nacos.test.naming.NamingBase.*;