Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
smx-Morgan committed Oct 15, 2024
1 parent cdc652a commit ec973fd
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions registry/nacos/nacoshertz/v2/nacos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,25 +159,16 @@ func TestMultipleInstances(t *testing.T) {
})
assert.Nil(t, err)

res, err := namingClient.SelectInstances(vo.SelectInstancesParam{
ServiceName: svcName,
GroupName: groupName,
Clusters: []string{clusterName},
HealthyOnly: true,
})
assert.Nil(t, err)
assert.Equal(t, 1, len(res))

err = got.Deregister(&registry.Info{
ServiceName: svcName,
Weight: 10,
Addr: utils.NewNetAddr("tcp", "127.0.0.1:8081"),
})
assert.Nil(t, err)

time.Sleep(time.Second * 30)
time.Sleep(time.Second * 5)

res, err = namingClient.SelectInstances(vo.SelectInstancesParam{
res, err := namingClient.SelectInstances(vo.SelectInstancesParam{
ServiceName: svcName,
GroupName: groupName,
Clusters: []string{clusterName},
Expand Down

0 comments on commit ec973fd

Please sign in to comment.