From 7d183b7c90b4477fa56d623ced1cbb1699b4b8df Mon Sep 17 00:00:00 2001 From: Joe Zou <yixian.zou@gmail.com> Date: Fri, 31 Jan 2020 14:31:32 +0800 Subject: [PATCH] fix test case --- cluster/router/condition/factory_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cluster/router/condition/factory_test.go b/cluster/router/condition/factory_test.go index aed8913ea..c00c1903c 100644 --- a/cluster/router/condition/factory_test.go +++ b/cluster/router/condition/factory_test.go @@ -233,7 +233,12 @@ func TestRoute_ReturnEmpty(t *testing.T) { func TestRoute_ReturnAll(t *testing.T) { localIP, _ := gxnet.GetLocalIP() - invokers := []protocol.Invoker{&MockInvoker{}, &MockInvoker{}, &MockInvoker{}} + urlString := "dubbo://" + localIP + "/com.foo.BarService" + dubboURL, _ := common.NewURL(context.TODO(), urlString) + mockInvoker1 := NewMockInvoker(dubboURL, 1) + mockInvoker2 := NewMockInvoker(dubboURL, 1) + mockInvoker3 := NewMockInvoker(dubboURL, 1) + invokers := []protocol.Invoker{mockInvoker1, mockInvoker2, mockInvoker3} inv := &invocation.RPCInvocation{} rule := base64.URLEncoding.EncodeToString([]byte("host = " + localIP + " => " + " host = " + localIP)) curl, _ := common.NewURL(context.TODO(), "consumer://"+localIP+"/com.foo.BarService") -- GitLab