rm test useless code

pull/217/head
libi.chai 6 years ago
parent e19cc05abe
commit a1ae2ee967
  1. 8
      pkg/naming/etcd/etcd_test.go

@ -53,9 +53,7 @@ func TestNew(t *testing.T) {
fmt.Println(err) fmt.Println(err)
} }
fmt.Println(1111)
app2 := builder.Build("app2") app2 := builder.Build("app2")
fmt.Println(1111)
go func() { go func() {
fmt.Println("节点列表") fmt.Println("节点列表")
@ -69,6 +67,8 @@ func TestNew(t *testing.T) {
fmt.Printf("app: %s host %s \n", in.AppID, in.Hostname) fmt.Printf("app: %s host %s \n", in.AppID, in.Hostname)
} }
} }
}else{
fmt.Println("\n")
} }
fmt.Printf("app2: ") fmt.Printf("app2: ")
r2, _ := app2.Fetch(context.Background()) r2, _ := app2.Fetch(context.Background())
@ -79,12 +79,13 @@ func TestNew(t *testing.T) {
fmt.Printf("app: %s host %s \n", in.AppID, in.Hostname) fmt.Printf("app: %s host %s \n", in.AppID, in.Hostname)
} }
} }
}else{
fmt.Printf("\n")
} }
time.Sleep(time.Second) time.Sleep(time.Second)
} }
}() }()
fmt.Println(1111)
time.Sleep(time.Second * 5) time.Sleep(time.Second * 5)
fmt.Println("取消app1") fmt.Println("取消app1")
app1Cancel() app1Cancel()
@ -93,6 +94,5 @@ func TestNew(t *testing.T) {
fmt.Println("取消app2") fmt.Println("取消app2")
app2Cancel() app2Cancel()
fmt.Println(1111)
time.Sleep(30*time.Second) time.Sleep(30*time.Second)
} }

Loading…
Cancel
Save