funky-eyes commented on code in PR #6325:
URL: https://github.com/apache/incubator-seata/pull/6325#discussion_r1477242123


##########
core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingServer.java:
##########
@@ -268,4 +268,8 @@ public void close(ChannelHandlerContext ctx, ChannelPromise 
future) throws Excep
         }
 
     }
+
+    protected void setListenPort(int listenPort){

Review Comment:
   > > 
为什么不使用system.setproperty("SEATA_PORT"),或者properties配置等方式指定端口,而是开放setListenPort? 
Why not specify the port using system.setproperty("SEATA_PORT"), or properties 
configuration, etc., but instead open up setListenPort?
   > 
   > 为了方便给测试类直接代码决定port值,而且在测试里同时有mock-server和普通server的情况下,共用那个配置也分不清 To make 
it easier to determine the port value for the test class, and in the case of 
having both a mock-server and a regular server in the test, it's hard to tell 
if it's sharing that configuration.
   
   
有mock-server的时候在启动前往system.setproperty就行了,不存在共用配置的问题,-D参数优先级是最高的,或者seata.server.service-port这个key
   There are mock-server in the startup to system.setproperty on the line, 
there is no problem of shared configuration, -D parameter priority is the 
highest, or seata.server.service-port the key



-- 
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