overlogged opened a new issue, #2460:
URL: https://github.com/apache/brpc/issues/2460

   **Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
   
   
   **Describe the solution you'd like (描述你期望的解决方法)**
   
   
   **Describe alternatives you've considered (描述你想到的折衷方案)**
   
   
   **Additional context/screenshots (更多上下文/截图)**
   
   想请教一下大家,怎样比较优雅地实现 UT。我目前的代码的角色是 brpc client,然后我 mock 了一个 brpc 
service,让它在本地端口启动,然后让我的业务代码去向那个临时端口发请求,以验证我的业务逻辑。
   现在问题有两个,一个ut没法并行运行,因为它们要占用同一个测试端口,如果给每一个ut都配一个端口,端口数量不太够。
   第二个是 ut 运行的时候,本地端口的通信总是会有一些问题,可能是之前的请求的残留或是其他,而且在 valgrind 
测试时,rpc框架就更慢了,这有时候导致rpc超时进而ut失败。
   
   所以想请教一下,有没有办法,通过mock直接把rpc层绕过,让我的client层直接调用mock service。
   
   


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