From 3352d9671c6b9ad9a6e23839b70221e20ab1f0f7 Mon Sep 17 00:00:00 2001 From: cvictory Date: Fri, 25 Sep 2020 10:52:06 +0800 Subject: [PATCH] fix #750. 1.fix unit test --- registry/directory/directory_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/registry/directory/directory_test.go b/registry/directory/directory_test.go index e02cff64a1..f06cccb454 100644 --- a/registry/directory/directory_test.go +++ b/registry/directory/directory_test.go @@ -207,11 +207,11 @@ func Test_RefreshUrl(t *testing.T) { mockRegistry.MockEvent(®istry.ServiceEvent{Action: remoting.EventTypeAdd, Service: providerUrl}) time.Sleep(1e9) assert.Len(t, registryDirectory.cacheInvokers, 4) - mockRegistry.MockEvents([]*registry.ServiceEvent{®istry.ServiceEvent{Action: remoting.EventTypeAdd, Service: providerUrl}}) + mockRegistry.MockEvents([]*registry.ServiceEvent{®istry.ServiceEvent{Action: remoting.EventTypgeUpdate, Service: providerUrl}}) time.Sleep(1e9) assert.Len(t, registryDirectory.cacheInvokers, 1) - mockRegistry.MockEvents([]*registry.ServiceEvent{®istry.ServiceEvent{Action: remoting.EventTypeAdd, Service: providerUrl}, - ®istry.ServiceEvent{Action: remoting.EventTypeAdd, Service: providerUrl2}}) + mockRegistry.MockEvents([]*registry.ServiceEvent{®istry.ServiceEvent{Action: remoting.EventTypeUpdate, Service: providerUrl}, + ®istry.ServiceEvent{Action: remoting.EventTypeUpdate, Service: providerUrl2}}) time.Sleep(1e9) assert.Len(t, registryDirectory.cacheInvokers, 2) // clear all address