LaurenceLiZhixin commented on a change in pull request #1693:
URL: https://github.com/apache/dubbo-go/pull/1693#discussion_r784608116



##########
File path: registry/etcdv3/service_discovery_test.go
##########
@@ -17,51 +17,128 @@
 
 package etcdv3
 
-//
-//var testName = "test"
-//
-//func setUp() {
-//     config.GetRootConfig().ServiceDiscoveries[testName] = 
&config.ServiceDiscoveryConfig{
-//             Protocol:  "etcdv3",
-//             RemoteRef: testName,
-//     }
-//
-//     //config.GetRootConfig().Remotes[testName] = &config.RemoteConfig{
-//     //      Address:    "localhost:2379",
-//     //      TimeoutStr: "10s",
-//     //}
-//}
-//
-//func Test_newEtcdV3ServiceDiscovery(t *testing.T) {
-//     name := constant.ETCDV3_KEY
-//     _, err := newEtcdV3ServiceDiscovery()
-//
-//     // warn: log configure file name is nil
-//     assert.NotNil(t, err)
-//
-//     sdc := &config.ServiceDiscoveryConfig{
-//             Protocol:  "etcdv3",
-//             RemoteRef: "mock",
-//     }
-//     config.GetRootConfig().ServiceDiscoveries[name] = sdc
-//
-//     _, err = newEtcdV3ServiceDiscovery()
-//
-//     // RemoteConfig not found
-//     assert.NotNil(t, err)
-//
-//     //config.GetRootConfig().Remotes["mock"] = &config.RemoteConfig{
-//     //      Address:    "localhost:2379",
-//     //      TimeoutStr: "10s",
-//     //}
-//
-//     res, err := newEtcdV3ServiceDiscovery()
-//     assert.Nil(t, err)
-//     assert.NotNil(t, res)
-//}
-//
-//func TestEtcdV3ServiceDiscovery_GetDefaultPageSize(t *testing.T) {
-//     setUp()
-//     serviceDiscovery := &etcdV3ServiceDiscovery{}
-//     assert.Equal(t, registry.DefaultPageSize, 
serviceDiscovery.GetDefaultPageSize())
-//}
+import (
+       "context"
+       "sync"
+       "testing"
+)
+
+import (
+       "github.com/stretchr/testify/assert"
+)
+
+import (
+       "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/protocol"
+       "dubbo.apache.org/dubbo-go/v3/registry"
+)
+
+const testName = "test"
+
+func Test_newEtcdV3ServiceDiscovery(t *testing.T) {

Review comment:
        @A-Wanderer  测试方法名统一一下吧,都用驼峰。




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