diff --git a/config_center/nacos/client_test.go b/config_center/nacos/client_test.go index 6408b244d6d4f3bb945a67e95dc187b367608740..47a05dec6674e995aa9e5bd177ef339b768aa740 100644 --- a/config_center/nacos/client_test.go +++ b/config_center/nacos/client_test.go @@ -1,7 +1,6 @@ package nacos import ( - "fmt" "strings" "testing" ) @@ -23,14 +22,10 @@ func Test_newNacosClient(t *testing.T) { done: make(chan struct{}), } err := ValidateNacosClient(c, WithNacosName(nacosClientName)) - if err != nil { - fmt.Println("nacos client start error ,error message is", err) - } assert.NoError(t, err) c.wg.Add(1) go HandleClientRestart(c) c.client.Close() <-c.client.Done() - fmt.Println("nacos client close done") c.Destroy() } diff --git a/config_center/nacos/impl_test.go b/config_center/nacos/impl_test.go index 27a9a02355967f0b5b732c7f65b1288b34f6afd0..e5f5eb6328663dba251169dbd1ac3d73988d159c 100644 --- a/config_center/nacos/impl_test.go +++ b/config_center/nacos/impl_test.go @@ -77,14 +77,10 @@ func initNacosData(t *testing.T) (*nacosDynamicConfiguration, error) { nacosURL := strings.ReplaceAll(server.URL, "http", "registry") regurl, _ := common.NewURL(nacosURL) nacosConfiguration, err := newNacosDynamicConfiguration(®url) - if err != nil { - fmt.Println("error:newNacosDynamicConfiguration", err.Error()) - assert.NoError(t, err) - return nil, err - } + assert.NoError(t, err) + nacosConfiguration.SetParser(&parser.DefaultConfigurationParser{}) - assert.NoError(t, err) return nacosConfiguration, err } @@ -104,10 +100,7 @@ func Test_AddListener(t *testing.T) { time.Sleep(time.Second * 2) nacos.AddListener("dubbo.properties", listener) listener.wg.Add(1) - fmt.Println("begin to listen") listener.wg.Wait() - fmt.Println("end", listener.event) - } func Test_RemoveListener(t *testing.T) { @@ -120,7 +113,6 @@ type mockDataListener struct { } func (l *mockDataListener) Process(configType *config_center.ConfigChangeEvent) { - fmt.Println("process!!!!!!!!!!") l.wg.Done() l.event = configType.Key }