Snow-kal commented on code in PR #3283:
URL: https://github.com/apache/dubbo-go/pull/3283#discussion_r3069274734


##########
client/prio_test.go:
##########
@@ -0,0 +1,187 @@
+/*
+ * 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 client_test
+
+import (
+       "context"
+       "testing"
+)
+
+import (
+       "github.com/stretchr/testify/assert"
+       "github.com/stretchr/testify/require"
+)
+
+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/constant"
+       _ "dubbo.apache.org/dubbo-go/v3/protocol/triple"
+       "dubbo.apache.org/dubbo-go/v3/server"
+)
+
+const (
+       newConfigAPIPriorityInstanceGroup   = "new-config-instance-group"
+       newConfigAPIPriorityInstanceVersion = "new-config-instance-version"
+       newConfigAPIPriorityServerGroup     = "new-config-server-group"
+       newConfigAPIPriorityServerVersion   = "new-config-server-version"
+       newConfigAPIPriorityClientGroup     = "new-config-client-group"
+       newConfigAPIPriorityClientVersion   = "new-config-client-version"
+       newConfigAPIPriorityServiceName     = 
"com.example.NewConfigAPIPriorityService"
+       newConfigAPIPriorityServiceMethod   = "Ping"
+)
+
+type newConfigAPIReferenceSnapshot struct {

Review Comment:
   感谢建议 已更改
   
   在 registerPrioService 里增加了更完整的结构断言:
   svcOpts.Application/Provider/Service 非空
   svcOpts.Id 与 svcOpts.Service.Interface 等于 prioTestServiceName
   svcOpts.Service.NotRegister == true
   用 GetServiceOptions 再次取回并 assert.Same,确认索引一致性
   
   <img width="697" height="890" alt="image" 
src="https://github.com/user-attachments/assets/efb33245-6652-4353-9193-dc2be6b0a794";
 />
   



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