You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ya...@apache.org on 2020/03/09 16:15:07 UTC
[servicecomb-java-chassis] 18/19: [SCB-1691] fix CI error
This is an automated email from the ASF dual-hosted git repository.
yaohaishi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git
commit 369c57827da9969ce93af2f03340c2ac6cdda4f6
Author: yhs0092 <yh...@163.com>
AuthorDate: Sat Feb 29 03:11:57 2020 +0800
[SCB-1691] fix CI error
---
.../client/http/TestServiceRegistryClientImpl.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/client/http/TestServiceRegistryClientImpl.java b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/client/http/TestServiceRegistryClientImpl.java
index a63b7bc..61c179d 100644
--- a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/client/http/TestServiceRegistryClientImpl.java
+++ b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/client/http/TestServiceRegistryClientImpl.java
@@ -43,7 +43,6 @@ import org.apache.servicecomb.serviceregistry.api.response.GetSchemaResponse;
import org.apache.servicecomb.serviceregistry.api.response.GetSchemasResponse;
import org.apache.servicecomb.serviceregistry.api.response.GetServiceResponse;
import org.apache.servicecomb.serviceregistry.client.ClientException;
-import org.apache.servicecomb.serviceregistry.client.IpPortManager;
import org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.ResponseWrapper;
import org.apache.servicecomb.serviceregistry.config.ServiceRegistryConfig;
import org.apache.servicecomb.serviceregistry.definition.DefinitionConst;
@@ -69,9 +68,6 @@ import mockit.MockUp;
import mockit.Mocked;
public class TestServiceRegistryClientImpl {
- @Mocked
- private IpPortManager ipPortManager;
-
private ServiceRegistryClientImpl oClient = null;
private Microservice microservice = new Microservice();
@@ -161,6 +157,14 @@ public class TestServiceRegistryClientImpl {
@Test
public void testRegisterSchemaNoResponse() {
+ new MockUp<RestClientUtil>() {
+ @Mock
+ void put(IpPort ipPort, String uri, RequestParam requestParam,
+ Handler<RestResponse> responseHandler) {
+ // do nothing to mock null response
+ }
+ };
+
new RegisterSchemaTester() {
void doRun(java.util.List<LoggingEvent> events) {
oClient.registerSchema("msid", "schemaId", "content");