Skip to content
Snippets Groups Projects
Commit 206f8f0a authored by cvictory's avatar cvictory
Browse files

add test for clear all address

parent 376adec8
No related branches found
No related tags found
No related merge requests found
......@@ -214,6 +214,10 @@ func Test_RefreshUrl(t *testing.T) {
&registry.ServiceEvent{Action: remoting.EventTypeAdd, Service: providerUrl2}})
time.Sleep(1e9)
assert.Len(t, registryDirectory.cacheInvokers, 2)
// clear all address
mockRegistry.MockEvents([]*registry.ServiceEvent{})
time.Sleep(1e9)
assert.Len(t, registryDirectory.cacheInvokers, 0)
}
func normalRegistryDir(noMockEvent ...bool) (*RegistryDirectory, *registry.MockRegistry) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment