You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2018/03/30 08:34:49 UTC

[incubator-servicecomb-java-chassis] 02/04: SCB-447 modify test cases that are affected by SPI cache.

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

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit 3315da4664305a13c2d1d87291bedc9a3e954e99
Author: wujimin <wu...@huawei.com>
AuthorDate: Thu Mar 29 15:05:12 2018 +0800

    SCB-447 modify test cases that are affected by SPI cache.
---
 .../apache/servicecomb/common/rest/TestAbstractRestInvocation.java | 2 +-
 .../transport/rest/servlet/TestRestServletProducerInvocation.java  | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/common/common-rest/src/test/java/org/apache/servicecomb/common/rest/TestAbstractRestInvocation.java b/common/common-rest/src/test/java/org/apache/servicecomb/common/rest/TestAbstractRestInvocation.java
index 363bfab..72d0b13 100644
--- a/common/common-rest/src/test/java/org/apache/servicecomb/common/rest/TestAbstractRestInvocation.java
+++ b/common/common-rest/src/test/java/org/apache/servicecomb/common/rest/TestAbstractRestInvocation.java
@@ -656,7 +656,7 @@ public class TestAbstractRestInvocation {
     }.getMockInstance();
 
     initRestInvocation();
-    List<HttpServerFilter> httpServerFilters = SPIServiceUtils.getSortedService(HttpServerFilter.class);
+    List<HttpServerFilter> httpServerFilters = SPIServiceUtils.loadSortedService(HttpServerFilter.class);
     httpServerFilters.add(filter);
     restInvocation.setHttpServerFilters(httpServerFilters);
 
diff --git a/transports/transport-rest/transport-rest-servlet/src/test/java/org/apache/servicecomb/transport/rest/servlet/TestRestServletProducerInvocation.java b/transports/transport-rest/transport-rest-servlet/src/test/java/org/apache/servicecomb/transport/rest/servlet/TestRestServletProducerInvocation.java
index b623fe5..a83480a 100644
--- a/transports/transport-rest/transport-rest-servlet/src/test/java/org/apache/servicecomb/transport/rest/servlet/TestRestServletProducerInvocation.java
+++ b/transports/transport-rest/transport-rest-servlet/src/test/java/org/apache/servicecomb/transport/rest/servlet/TestRestServletProducerInvocation.java
@@ -26,7 +26,6 @@ import org.apache.servicecomb.common.rest.RestProducerInvocation;
 import org.apache.servicecomb.common.rest.definition.RestOperationMeta;
 import org.apache.servicecomb.common.rest.filter.HttpServerFilter;
 import org.apache.servicecomb.core.definition.OperationMeta;
-import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils;
 import org.apache.servicecomb.foundation.vertx.http.HttpServletRequestEx;
 import org.apache.servicecomb.foundation.vertx.http.StandardHttpServletRequestEx;
 import org.junit.Assert;
@@ -60,7 +59,7 @@ public class TestRestServletProducerInvocation {
     };
 
     List<HttpServerFilter> httpServerFilters = Arrays.asList(f1);
-    new Expectations(SPIServiceUtils.class) {
+    new Expectations() {
       {
         f1.needCacheRequest(operationMeta);
         result = true;
@@ -76,7 +75,7 @@ public class TestRestServletProducerInvocation {
   @Test
   public void collectCacheRequestCacheTrue(@Mocked HttpServerFilter f1) {
     List<HttpServerFilter> httpServerFilters = Arrays.asList(f1);
-    new Expectations(SPIServiceUtils.class) {
+    new Expectations() {
       {
         f1.needCacheRequest(operationMeta);
         result = true;
@@ -90,7 +89,7 @@ public class TestRestServletProducerInvocation {
   @Test
   public void collectCacheRequestCacheFalse(@Mocked HttpServerFilter f1) {
     List<HttpServerFilter> httpServerFilters = Arrays.asList(f1);
-    new Expectations(SPIServiceUtils.class) {
+    new Expectations() {
       {
         f1.needCacheRequest(operationMeta);
         result = false;

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.