slievrly commented on code in PR #6325:
URL: https://github.com/apache/incubator-seata/pull/6325#discussion_r1477696540


##########
test-mock-server/src/main/java/org/apache/seata/mockserver/MockServer.java:
##########
@@ -50,23 +55,28 @@ public class MockServer {
      */
     public static void main(String[] args) {
         SpringApplication.run(MockServer.class, args);
-        start();
+
+        ParameterParser parameterParser = new ParameterParser(args);
+        int port = parameterParser.getPort() > 0 ? parameterParser.getPort() : 
8099;
+        start(port);
     }
 
-    public static void start() {
+    public static void start(int port) {
         if (!inited) {
             synchronized (MockServer.class) {
                 if (!inited) {
                     inited = true;
+                    
System.setProperty(ConfigurationKeys.SERVER_SERVICE_PORT_CAMEL, 
String.valueOf(port));
+                    ConfigurationCache.getInstance().onChangeEvent(new 
ConfigurationChangeEvent(ConfigurationKeys.SERVER_SERVICE_PORT_CAMEL, 
String.valueOf(port)));

Review Comment:
   I don't think this is a user API.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to