You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/05/08 08:05:01 UTC

[GitHub] liubao68 closed pull request #673: [SCB-504] upgrade spring boot version

liubao68 closed pull request #673: [SCB-504] upgrade spring boot version
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/673
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/demo/demo-edge/consumer/src/main/java/org/apache/servicecomb/demo/edge/consumer/Consumer.java b/demo/demo-edge/consumer/src/main/java/org/apache/servicecomb/demo/edge/consumer/Consumer.java
index 284a8832e..7bdbb544d 100644
--- a/demo/demo-edge/consumer/src/main/java/org/apache/servicecomb/demo/edge/consumer/Consumer.java
+++ b/demo/demo-edge/consumer/src/main/java/org/apache/servicecomb/demo/edge/consumer/Consumer.java
@@ -114,7 +114,7 @@ protected void testDownloadBigFile() {
     }, resp -> {
       byte[] buf = new byte[1 * 1024 * 1024];
       try (InputStream is = resp.getBody()) {
-        for (;;) {
+        for (; ; ) {
           int len = is.read(buf);
           if (len == -1) {
             break;
@@ -125,14 +125,14 @@ protected void testDownloadBigFile() {
       }
       return null;
     });
-    Assert.isTrue(size.get() == 10 * 1024 * 1024);
+    Assert.isTrue(size.get() == 10 * 1024 * 1024, "size is : " + String.valueOf(size.get()) + " not 10 * 1024 * 1024");
     System.out.println("test download bigFile finished");
   }
 
   protected void testDownload() {
     String url = edgePrefix + "/v2/download";
     String content = template.getForObject(url, String.class);
-    Assert.isTrue("download".equals(content));
+    Assert.isTrue("download".equals(content), "content is : " + content + " not download");
     System.out.println("test download finished");
   }
 
diff --git a/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/CodeFirstSpringmvc.java b/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/CodeFirstSpringmvc.java
index 5bbd00700..8cae971f5 100644
--- a/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/CodeFirstSpringmvc.java
+++ b/demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/CodeFirstSpringmvc.java
@@ -85,7 +85,7 @@ private String _fileUpload(MultipartFile file1, Part file2) {
       String content1 = IOUtils.toString(is1);
       String content2 = IOUtils.toString(is2);
       return String.format("%s:%s:%s\n"
-          + "%s:%s:%s",
+              + "%s:%s:%s",
           file1.getOriginalFilename(),
           file1.getContentType(),
           content1,
@@ -310,7 +310,7 @@ public OutputModelForTestIgnore testModelWithIgnoreField(@RequestBody InputModel
     return new OutputModelForTestIgnore("output_id", input.getInputId(), input.getContent(), input.getInputObject(),
         input.getInputJsonObject(), input.getInputIgnoreInterface(),
         new Person("outputSomeone"), new JsonObject("{\"OutputJsonKey\" : \"OutputJsonValue\"}"), () -> {
-        });
+    });
   }
 
   @SuppressWarnings("unchecked")
@@ -336,7 +336,7 @@ public String testRawJsonAnnotation(@RawJsonRequestBody String jsonInput) {
   public String testform(HttpServletRequest request) {
     String form1 = request.getParameter("form1");
     String form2 = request.getParameter("form2");
-    Assert.notNull(form1);
+    Assert.notNull(form1, "from1 is null");
     return form1 + form2;
   }
 
diff --git a/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestLastPropertyPlaceholderConfigurer.java b/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestLastPropertyPlaceholderConfigurer.java
index a6dfc3909..d3d8491db 100644
--- a/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestLastPropertyPlaceholderConfigurer.java
+++ b/foundations/foundation-config/src/test/java/org/apache/servicecomb/config/TestLastPropertyPlaceholderConfigurer.java
@@ -61,7 +61,7 @@ public void test() {
       bean.resolver.resolveStringValue("${b}");
       Assert.fail("must throw exception");
     } catch (IllegalArgumentException e) {
-      Assert.assertEquals("Could not resolve placeholder 'b' in string value \"${b}\"", e.getMessage());
+      Assert.assertEquals("Could not resolve placeholder 'b' in value \"${b}\"", e.getMessage());
     }
 
     context.close();
diff --git a/integration-tests/spring-zuul-tracing-tests/src/test/java/org/apache/servicecomb/spring/cloud/zuul/tracing/SpringCloudZuulTracingTest.java b/integration-tests/spring-zuul-tracing-tests/src/test/java/org/apache/servicecomb/spring/cloud/zuul/tracing/SpringCloudZuulTracingTest.java
index 06dabf594..35a82b1de 100644
--- a/integration-tests/spring-zuul-tracing-tests/src/test/java/org/apache/servicecomb/spring/cloud/zuul/tracing/SpringCloudZuulTracingTest.java
+++ b/integration-tests/spring-zuul-tracing-tests/src/test/java/org/apache/servicecomb/spring/cloud/zuul/tracing/SpringCloudZuulTracingTest.java
@@ -17,12 +17,12 @@
 
 package org.apache.servicecomb.spring.cloud.zuul.tracing;
 
+import static com.seanyinx.github.unit.scaffolding.AssertUtils.expectFailing;
 import static org.hamcrest.Matchers.greaterThanOrEqualTo;
 import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
 import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
-import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
 import static org.springframework.http.HttpStatus.OK;
 
 import java.util.Collection;
@@ -81,16 +81,16 @@ public void tracesCallsReceivedFromZuulToCalledService() throws InterruptedExcep
 
   @Test
   public void tracesFailedCallsReceivedByZuul() throws InterruptedException {
-    ResponseEntity<String> responseEntity = testRestTemplate.getForEntity("/dummy/rest/oops", String.class);
-
-    assertThat(responseEntity.getStatusCode(), is(INTERNAL_SERVER_ERROR));
+    ResponseEntity<String> response = testRestTemplate.getForEntity("/dummy/rest/oops", String.class);
+    assertThat(response.getStatusCodeValue(), is(590));
+    assertThat(response.getBody(), is("CommonExceptionData [message=Cse Internal Server Error]"));
 
     TimeUnit.MILLISECONDS.sleep(1000);
 
     Collection<String> tracingMessages = appender.pollLogs(".*\\[\\w+/\\w+/\\w*\\]\\s+INFO.*(logged tracing|/oops).*");
     assertThat(tracingMessages.size(), greaterThanOrEqualTo(2));
 
-    assertThatSpansReceivedByZipkin(tracingMessages, "/dummy/rest/oops", "500", "/oops", "590");
+    assertThatSpansReceivedByZipkin(tracingMessages, "/dummy/rest/oops", "/oops", "590");
   }
 
   @Test
diff --git a/integration-tests/springmvc-tests/src/test/java/org/apache/servicecomb/demo/springmvc/tests/SpringMvcIntegrationTestBase.java b/integration-tests/springmvc-tests/src/test/java/org/apache/servicecomb/demo/springmvc/tests/SpringMvcIntegrationTestBase.java
index a00dbbe9d..611916c9a 100644
--- a/integration-tests/springmvc-tests/src/test/java/org/apache/servicecomb/demo/springmvc/tests/SpringMvcIntegrationTestBase.java
+++ b/integration-tests/springmvc-tests/src/test/java/org/apache/servicecomb/demo/springmvc/tests/SpringMvcIntegrationTestBase.java
@@ -17,14 +17,12 @@
 
 package org.apache.servicecomb.demo.springmvc.tests;
 
-import static com.seanyinx.github.unit.scaffolding.AssertUtils.expectFailing;
 import static java.time.temporal.ChronoUnit.SECONDS;
 import static org.apache.servicecomb.serviceregistry.client.LocalServiceRegistryClientImpl.LOCAL_REGISTRY_FILE_KEY;
 import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
 import static org.springframework.http.HttpHeaders.CONTENT_TYPE;
 import static org.springframework.http.HttpMethod.GET;
 import static org.springframework.http.HttpMethod.POST;
@@ -69,9 +67,7 @@
 import org.springframework.util.concurrent.ListenableFuture;
 import org.springframework.util.concurrent.ListenableFutureCallback;
 import org.springframework.web.client.AsyncRestTemplate;
-import org.springframework.web.client.RestClientException;
 import org.springframework.web.client.RestTemplate;
-import org.springframework.web.client.UnknownHttpStatusCodeException;
 
 @Ignore
 public class SpringMvcIntegrationTestBase {
@@ -329,14 +325,10 @@ public void blowsUpWhenFileNameDoesNotMatch() throws Exception {
     HttpHeaders headers = new HttpHeaders();
     headers.setContentType(MediaType.MULTIPART_FORM_DATA);
 
-    try {
-      restTemplate.postForObject(
-          codeFirstUrl + "uploadWithoutAnnotation",
-          new HttpEntity<>(map, headers),
-          String.class);
-      expectFailing(UnknownHttpStatusCodeException.class);
-    } catch (RestClientException ignored) {
-    }
+    ResponseEntity<String> response = restTemplate
+        .postForEntity(codeFirstUrl + "uploadWithoutAnnotation", new HttpEntity<>(map, headers), String.class);
+    assertThat(response.getStatusCodeValue(), is(590));
+    assertThat(response.getBody(), is("CommonExceptionData [message=Cse Internal Server Error]"));
   }
 
   @Test
@@ -511,7 +503,6 @@ public void ableToExchangeCookie() throws Exception {
             params);
     result = listenableFuture.get();
     assertThat(result.getBody(), is(2));
-
   }
 
   @Test
@@ -637,14 +628,10 @@ public void ensureServerWorksFine() throws Exception {
 
   @Test
   public void ensureServerBlowsUp() {
-    try {
-      restTemplate.getForObject(
-          controllerUrl + "sayhi?name=throwexception",
-          String.class);
-      fail("Exception expected, but threw nothing");
-    } catch (UnknownHttpStatusCodeException e) {
-      assertThat(e.getRawStatusCode(), is(590));
-    }
+    ResponseEntity<String> response = restTemplate
+        .getForEntity(controllerUrl + "sayhi?name=throwexception", String.class);
+    assertThat(response.getStatusCodeValue(), is(590));
+    assertThat(response.getBody(), is("{\"message\":\"Cse Internal Server Error\"}"));
   }
 
   @Test
@@ -678,7 +665,6 @@ public void onSuccess(ResponseEntity<String> result) {
           }
         }
     );
-
   }
 
   private <T> HttpEntity<T> jsonRequest(T body) {
diff --git a/java-chassis-dependencies/pom.xml b/java-chassis-dependencies/pom.xml
index 970fc6beb..9d05e160e 100644
--- a/java-chassis-dependencies/pom.xml
+++ b/java-chassis-dependencies/pom.xml
@@ -34,7 +34,7 @@
     <jackson.version>2.9.5</jackson.version>
     <vertx.version>3.5.0</vertx.version>
     <tec.zkclient.version>0.8</tec.zkclient.version>
-    <spring.version>4.3.5.RELEASE</spring.version>
+    <spring.version>4.3.16.RELEASE</spring.version>
     <slf4j.version>1.7.7</slf4j.version>
     <log4j.version>1.2.17</log4j.version>
     <log4j2.version>2.8.2</log4j2.version>
@@ -140,6 +140,12 @@
         <version>1.3</version>
         <scope>test</scope>
       </dependency>
+      <dependency>
+        <groupId>org.hamcrest</groupId>
+        <artifactId>hamcrest-all</artifactId>
+        <version>1.3</version>
+        <scope>test</scope>
+      </dependency>
       <dependency>
         <groupId>com.dyuproject.protostuff</groupId>
         <artifactId>protostuff-api</artifactId>
@@ -655,7 +661,7 @@
       <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-dependencies</artifactId>
-        <version>1.4.5.RELEASE</version>
+        <version>1.5.12.RELEASE</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
@@ -663,7 +669,7 @@
       <dependency>
         <groupId>org.springframework.cloud</groupId>
         <artifactId>spring-cloud-dependencies</artifactId>
-        <version>Camden.SR6</version>
+        <version>Edgware.SR3</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
diff --git a/java-chassis-distribution/src/release/LICENSE b/java-chassis-distribution/src/release/LICENSE
index 62ff0963b..ff3f2ce97 100644
--- a/java-chassis-distribution/src/release/LICENSE
+++ b/java-chassis-distribution/src/release/LICENSE
@@ -378,26 +378,26 @@ Prometheus Java Simpleclient Common (http://github.com/prometheus/client_java/si
 Prometheus Java Simpleclient Httpserver (http://github.com/prometheus/client_java/simpleclient_httpserver) io.prometheus:simpleclient_httpserver:bundle:0.1.0
 ProtoParser (http://github.com/square/protoparser/) com.squareup:protoparser:jar:4.0.3
 SnakeYAML (http://www.snakeyaml.org) org.yaml:snakeyaml:bundle:1.16
-Spring AOP (https://github.com/spring-projects/spring-framework) org.springframework:spring-aop:jar:4.3.5.RELEASE
-Spring Aspects (https://github.com/spring-projects/spring-framework) org.springframework:spring-aspects:jar:4.3.5.RELEASE
-Spring Beans (https://github.com/spring-projects/spring-framework) org.springframework:spring-beans:jar:4.3.5.RELEASE
-Spring Boot (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot:jar:1.4.5.RELEASE
-Spring Boot AOP Starter (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-starter-aop:jar:1.4.5.RELEASE
-Spring Boot Actuator (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-actuator:jar:1.4.5.RELEASE
-Spring Boot Actuator Starter (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-starter-actuator:jar:1.4.5.RELEASE
-Spring Boot AutoConfigure (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-autoconfigure:jar:1.4.5.RELEASE
-Spring Boot Logging Starter (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-starter-logging:jar:1.4.5.RELEASE
-Spring Boot Starter (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-starter:jar:1.4.5.RELEASE
-Spring Boot Tomcat Starter (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-starter-tomcat:jar:1.4.5.RELEASE
-Spring Boot Web Starter (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-starter-web:jar:1.4.5.RELEASE
+Spring AOP (https://github.com/spring-projects/spring-framework) org.springframework:spring-aop:jar:4.3.16.RELEASE
+Spring Aspects (https://github.com/spring-projects/spring-framework) org.springframework:spring-aspects:jar:4.3.16.RELEASE
+Spring Beans (https://github.com/spring-projects/spring-framework) org.springframework:spring-beans:jar:4.3.16.RELEASE
+Spring Boot (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot:jar:1.5.12.RELEASE
+Spring Boot AOP Starter (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-starter-aop:jar:1.5.12.RELEASE
+Spring Boot Actuator (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-actuator:jar:1.5.12.RELEASE
+Spring Boot Actuator Starter (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-starter-actuator:jar:1.5.12.RELEASE
+Spring Boot AutoConfigure (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-autoconfigure:jar:1.5.12.RELEASE
+Spring Boot Logging Starter (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-starter-logging:jar:1.5.12.RELEASE
+Spring Boot Starter (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-starter:jar:1.5.12.RELEASE
+Spring Boot Tomcat Starter (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.12.RELEASE
+Spring Boot Web Starter (http://projects.spring.io/spring-boot/) org.springframework.boot:spring-boot-starter-web:jar:1.5.12.RELEASE
 Spring Cloud Commons (https://projects.spring.io/spring-cloud/spring-cloud-commons/) org.springframework.cloud:spring-cloud-commons:jar:1.1.8.RELEASE
 Spring Cloud Context (https://projects.spring.io/spring-cloud/spring-cloud-context/) org.springframework.cloud:spring-cloud-context:jar:1.1.8.RELEASE
 Spring Cloud Netflix Core (https://spring.io/spring-cloud/spring-cloud-netflix/spring-cloud-netflix-core) org.springframework.cloud:spring-cloud-netflix-core:jar:1.2.6.RELEASE
-Spring Context (https://github.com/spring-projects/spring-framework) org.springframework:spring-context:jar:4.3.5.RELEASE
-Spring Core (https://github.com/spring-projects/spring-framework) org.springframework:spring-core:jar:4.3.5.RELEASE
-Spring Expression Language (SpEL) (https://github.com/spring-projects/spring-framework) org.springframework:spring-expression:jar:4.3.5.RELEASE
-Spring Web (https://github.com/spring-projects/spring-framework) org.springframework:spring-web:jar:4.3.5.RELEASE
-Spring Web MVC (https://github.com/spring-projects/spring-framework) org.springframework:spring-webmvc:jar:4.3.5.RELEASE
+Spring Context (https://github.com/spring-projects/spring-framework) org.springframework:spring-context:jar:4.3.16.RELEASE
+Spring Core (https://github.com/spring-projects/spring-framework) org.springframework:spring-core:jar:4.3.16.RELEASE
+Spring Expression Language (SpEL) (https://github.com/spring-projects/spring-framework) org.springframework:spring-expression:jar:4.3.16.RELEASE
+Spring Web (https://github.com/spring-projects/spring-framework) org.springframework:spring-web:jar:4.3.16.RELEASE
+Spring Web MVC (https://github.com/spring-projects/spring-framework) org.springframework:spring-webmvc:jar:4.3.16.RELEASE
 Vert.x Bridge Common (http://nexus.sonatype.org/oss-repository-hosting.html/vertx-parent/vertx-ext/vertx-ext-parent/vertx-bridge-common) io.vertx:vertx-bridge-common:jar:3.5.0
 Vert.x Core (http://nexus.sonatype.org/oss-repository-hosting.html/vertx-parent/vertx-core) io.vertx:vertx-core:jar:3.5.0
 Woodstox (https://github.com/FasterXML/woodstox) com.fasterxml.woodstox:woodstox-core:bundle:5.0.3
diff --git a/samples/bmi/build.gradle b/samples/bmi/build.gradle
index 7109344c5..3dfb8b530 100644
--- a/samples/bmi/build.gradle
+++ b/samples/bmi/build.gradle
@@ -24,7 +24,7 @@ allprojects  {
 
 buildscript {
     dependencies {
-        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.5.RELEASE")
+        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.12.RELEASE")
     }
     repositories {
         mavenLocal()
diff --git a/samples/bmi/pom.xml b/samples/bmi/pom.xml
index 2c5057727..059189a62 100644
--- a/samples/bmi/pom.xml
+++ b/samples/bmi/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-starter-parent</artifactId>
-    <version>1.4.5.RELEASE</version>
+    <version>1.5.12.RELEASE</version>
     <relativePath /> <!-- lookup parent from repository -->
   </parent>
 
diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/config/ServiceRegistryConfig.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/config/ServiceRegistryConfig.java
index eb28ed72b..113fed0f0 100644
--- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/config/ServiceRegistryConfig.java
+++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/config/ServiceRegistryConfig.java
@@ -130,7 +130,7 @@ public boolean isSsl() {
     ArrayList<IpPort> ipPortList = new ArrayList<>();
     uriList.forEach(anUriList -> {
       try {
-        URI uri = new URI(anUriList);
+        URI uri = new URI(anUriList.trim());
         this.ssl = "https".equals(uri.getScheme());
         ipPortList.add(NetUtils.parseIpPort(uri.getScheme(), uri.getAuthority()));
       } catch (Exception e) {
diff --git a/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClient.java b/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClient.java
index 341864b58..ef4857511 100644
--- a/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClient.java
+++ b/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClient.java
@@ -65,6 +65,7 @@ public String description() {
   }
 
   @Override
+  @Deprecated
   public ServiceInstance getLocalServiceInstance() {
     return null;
   }
diff --git a/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClientConfiguration.java b/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClientConfiguration.java
index 603d9a085..a6c377e21 100644
--- a/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClientConfiguration.java
+++ b/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClientConfiguration.java
@@ -19,12 +19,12 @@
 import org.springframework.boot.autoconfigure.AutoConfigureBefore;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.cloud.client.discovery.DiscoveryClient;
-import org.springframework.cloud.client.discovery.noop.NoopDiscoveryClientAutoConfiguration;
+import org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClientAutoConfiguration;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.core.annotation.Order;
 
-@AutoConfigureBefore(NoopDiscoveryClientAutoConfiguration.class)
+@AutoConfigureBefore(SimpleDiscoveryClientAutoConfiguration.class)
 @Configuration
 public class CseDiscoveryClientConfiguration {
   @Bean
diff --git a/spring-boot-starter/spring-boot-starter-discovery/src/test/java/org/apache/servicecomb/springboot/starter/discovery/TestCseDiscoveryClient.java b/spring-boot-starter/spring-boot-starter-discovery/src/test/java/org/apache/servicecomb/springboot/starter/discovery/TestCseDiscoveryClient.java
index 08a13cef9..727b306f7 100644
--- a/spring-boot-starter/spring-boot-starter-discovery/src/test/java/org/apache/servicecomb/springboot/starter/discovery/TestCseDiscoveryClient.java
+++ b/spring-boot-starter/spring-boot-starter-discovery/src/test/java/org/apache/servicecomb/springboot/starter/discovery/TestCseDiscoveryClient.java
@@ -75,7 +75,6 @@ public void testCseDiscoveryClient(@Mocked RegistryUtils registryUtils,
 
     DiscoveryClient client = new CseDiscoveryClient();
     Assert.assertEquals("Spring Cloud CSE Discovery Client", client.description());
-    Assert.assertEquals(null, client.getLocalServiceInstance());
     Assert.assertEquals(2, client.getServices().size());
     Assert.assertEquals("server2", client.getServices().get(1));
     Assert.assertEquals(2, client.getInstances("service1-instance1").size());


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services