Snow-kal commented on code in PR #3283: URL: https://github.com/apache/dubbo-go/pull/3283#discussion_r3069258009
########## server/inst_test.go: ########## @@ -0,0 +1,179 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package server_test + +import ( + "context" + "net" + "strconv" + "testing" + "time" +) + +import ( + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "google.golang.org/protobuf/types/known/emptypb" + "google.golang.org/protobuf/types/known/wrapperspb" +) + +import ( + dubbo "dubbo.apache.org/dubbo-go/v3" + "dubbo.apache.org/dubbo-go/v3/client" + _ "dubbo.apache.org/dubbo-go/v3/cluster/cluster/available" + "dubbo.apache.org/dubbo-go/v3/common" + "dubbo.apache.org/dubbo-go/v3/common/constant" + "dubbo.apache.org/dubbo-go/v3/common/extension" + _ "dubbo.apache.org/dubbo-go/v3/filter/echo" + _ "dubbo.apache.org/dubbo-go/v3/filter/graceful_shutdown" + "dubbo.apache.org/dubbo-go/v3/protocol" + _ "dubbo.apache.org/dubbo-go/v3/protocol/triple" + tri "dubbo.apache.org/dubbo-go/v3/protocol/triple/triple_protocol" + _ "dubbo.apache.org/dubbo-go/v3/proxy/proxy_factory" Review Comment: 感谢建议 已更改 简单一下 分成3个小测试 TestCfgAPI_Create 负责验证创建阶段。 覆盖:NewInstance -> NewServer/NewClient 是否能正常构建对象。 TestCfgAPI_Export 负责验证服务端注册与导出阶段。 覆盖:服务注册、GetServiceOptions、Export/Unexport 生命周期是否正常。 TestCfgAPI_Call 负责验证端到端调用阶段。 覆盖:客户端 DialWithInfo + unary 调用 + 重试与超时控制 + 返回值正确性。 -- 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]
