Skip to content
Snippets Groups Projects
Commit bb020586 authored by amudong's avatar amudong
Browse files

fix:nacos client_test bug

parent d0d3ac19
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ package nacos ...@@ -3,6 +3,7 @@ package nacos
import ( import (
"strings" "strings"
"testing" "testing"
"time"
) )
import ( import (
...@@ -25,7 +26,10 @@ func Test_newNacosClient(t *testing.T) { ...@@ -25,7 +26,10 @@ func Test_newNacosClient(t *testing.T) {
assert.NoError(t, err) assert.NoError(t, err)
c.wg.Add(1) c.wg.Add(1)
go HandleClientRestart(c) go HandleClientRestart(c)
go func() {
time.Sleep(time.Second*10)
c.client.Close() c.client.Close()
}()
<-c.client.Done() <-c.client.Done()
c.Destroy() c.Destroy()
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment