zhufeizzz opened a new issue #2353:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2353


   我们计划是用SpringBootTest方式启动本微服务,并通过UT代码调用微服务自身CSE接口进行测试
   ```
   @SpringBootTest(classes = ScheduleJobApplication.class, webEnvironment = 
SpringBootTest.WebEnvironment.DEFINED_PORT)
   class TimerTaskSchedulerTest {
   }
   ```
   遇到几个问题:
   
1、如何指定HTTP端口,因为UT需要并发执行,理论上需要使用SpringBoot的RandomPort。那CSE如何启动?需要代码中动态获取随机端口好进行设置吗?
   2、当有多个实例启动时,如何保证CSE会调用到本节点?
   3、这种方式是不是标准的CSE 
UT写法,官方推荐如何进行?我看了你写的文档:https://github.com/apache/servicecomb-java-chassis/issues/1498。我们还是想以JUnit本地运行的方式测试,而不是部署到Docker进行远程调用测试。
   


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

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


Reply via email to