AlexStocks commented on code in PR #1023:
URL: https://github.com/apache/dubbo-go-pixiu/pull/1023#discussion_r3878274306
##########
pkg/filter/http/grpcproxy/connection_manager_test.go:
##########
@@ -253,6 +253,50 @@ func
TestGRPCConnectionManagerRejectsEvictedRemovedEndpointFromSnapshot(t *testi
require.Zero(t, dialCalls.Load())
}
+func TestGRPCConnectionManagerIgnoresStaleRemovalAfterTombstoneEviction(t
*testing.T) {
+ endpoint := startTestGRPCServer(t)
+ current := make(map[string]bool)
+ var currentMu sync.Mutex
+ var dialCalls atomic.Int32
+ manager := testConnectionManager(t, &dialCalls)
+ manager.endpointPresent = func(_, address string) bool {
Review Comment:
[P1] 用真实 ClusterManager wiring 验证 stale-removal 修复
这里直接替换 `grpcConnectionManager.endpointPresent` 并调用内部
`UpdateEndpointState`,绕过了修复真正依赖的 `Plugin.CreateFilterFactory ->
ClusterManager.AddEndpointStateHandler -> runtime snapshot` 生产链。即使 factory 没安装
snapshot 回调、handler 没注册或真实 endpoint 发布顺序仍有问题,本测试也会通过。请用真实 ClusterManager
mutation/handler wiring 重现 remove、tombstone eviction、re-add、delayed removal,再从
gRPC proxy 使用的 manager 发起连接或请求;同时用 Base 或撤销 snapshot guard 的 mutant 证明旧错误会失败。
--
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]