[
https://issues.apache.org/jira/browse/SCB-727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16541707#comment-16541707
]
ASF GitHub Bot commented on SCB-727:
------------------------------------
maheshrajus commented on a change in pull request #801: [SCB-727] Local
generated schema and service center schema are different then print the diff
content to the user
URL:
https://github.com/apache/incubator-servicecomb-java-chassis/pull/801#discussion_r202050121
##########
File path:
service-registry/src/test/java/org/apache/servicecomb/serviceregistry/task/TestMicroserviceRegisterTask.java
##########
@@ -498,12 +508,36 @@ public void
testLocalSchemaAndServiceCenterSchemaDiff(@Mocked ServiceRegistryCli
result = otherMicroservice;
srClient.getSchemas(anyString);
result = onlineSchemasHolder;
+ srClient.getSchema(anyString, anyString);
+ result = "abcdefghijklmn";
}
};
- microservice.addSchema("s1", "abdc");
+ microservice.addSchema("s1", "abcdefghijklmnopqrstuvwxyz");
microservice.setEnvironment("prod");
MicroserviceRegisterTask registerTask = new
MicroserviceRegisterTask(eventBus, srClient, microservice);
- registerTask.run();
+
+ Logger logger = Logger.getLogger(MicroserviceRegisterTask.class);
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ Layout layout = new SimpleLayout();
+ Appender appender = new WriterAppender(layout, out);
+ logger.addAppender(appender);
+ Boolean isIlleagalException = false;
+
+ try {
+ registerTask.run();
+ } catch (IllegalStateException exception) {
+ isIlleagalException = true;
+ String logMsg = out.toString();
+ assertNotNull(logMsg);
+ Assert.assertTrue(logMsg.contains("service center schema:"));
Review comment:
OK
----------------------------------------------------------------
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:
[email protected]
> Java Chassis-Local generated schema and service center schema are different
> while registering the service then print the difference content
> -------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SCB-727
> URL: https://issues.apache.org/jira/browse/SCB-727
> Project: Apache ServiceComb
> Issue Type: Improvement
> Affects Versions: java-chassis-1.0.0
> Reporter: Mahesh Raju Somalaraju
> Assignee: Mahesh Raju Somalaraju
> Priority: Major
> Fix For: java-chassis-1.0.0
>
>
> Java Chassis- Local generated schema and service center schema are different
> while registering the service then print the difference content.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)