AlexStocks commented on code in PR #3440:
URL: https://github.com/apache/dubbo-go/pull/3440#discussion_r3543615828


##########
remoting/exchange_client.go:
##########
@@ -132,6 +132,7 @@ func (client *ExchangeClient) Request(invocation 
*base.Invocation, url *common.U
        err := client.client.Request(request, timeout, rsp)
        // request error
        if err != nil {
+               RemovePendingResponse(SequenceType(request.ID))

Review Comment:
   [P1] 缺少 request error 清理路径的回归测试
   
   这里修复的是 `client.client.Request` 返回错误后 `pendingResponses` 未删除导致 map 
泄漏的问题,但当前测试只覆盖了手动 `Add/Get/RemovePendingResponse`,没有构造底层 client 返回 error 后确认对应 
request ID 已从 `pendingResponses` 删除。请补一个使用 mock `Client.Request` 返回错误的 
`Request`/`AsyncRequest` 回归测试;heartbeat timeout 
的清理路径也需要至少覆盖一个代表性失败场景,否则后续改动很容易把这类清理逻辑再次删掉而 CI 不会发现。



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