diff --git a/filter/common/impl/rejected_execution_handler_only_log.go b/filter/common/impl/rejected_execution_handler_only_log.go index 714133b913a4b3547065e33ffc33c4ba92d7df63..8943433af1ba908fc834740163df78e3b2b6443a 100644 --- a/filter/common/impl/rejected_execution_handler_only_log.go +++ b/filter/common/impl/rejected_execution_handler_only_log.go @@ -19,8 +19,6 @@ package impl import ( "sync" - - common2 "github.com/apache/dubbo-go/filter/common" ) import ( @@ -28,6 +26,7 @@ import ( "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/extension" "github.com/apache/dubbo-go/common/logger" + filterCommon "github.com/apache/dubbo-go/filter/common" "github.com/apache/dubbo-go/protocol" ) @@ -62,7 +61,7 @@ func (handler *OnlyLogRejectedExecutionHandler) RejectedExecution(url common.URL return &protocol.RPCResult{} } -func GetOnlyLogRejectedExecutionHandler() common2.RejectedExecutionHandler { +func GetOnlyLogRejectedExecutionHandler() filterCommon.RejectedExecutionHandler { onlyLogHandlerOnce.Do(func() { onlyLogHandlerInstance = &OnlyLogRejectedExecutionHandler{} }) diff --git a/filter/impl/tps_limit_filter_test.go b/filter/impl/tps_limit_filter_test.go index 7d625ac933b3d8a023518227c96361aed89a3a44..debdbd00dec97ed67d789bfc45103993c014ab4a 100644 --- a/filter/impl/tps_limit_filter_test.go +++ b/filter/impl/tps_limit_filter_test.go @@ -31,8 +31,8 @@ import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/extension" - common2 "github.com/apache/dubbo-go/filter/common" - impl2 "github.com/apache/dubbo-go/filter/common/impl" + filterCommon "github.com/apache/dubbo-go/filter/common" + filterCommonImpl "github.com/apache/dubbo-go/filter/common/impl" "github.com/apache/dubbo-go/filter/impl/tps" "github.com/apache/dubbo-go/filter/impl/tps/impl" "github.com/apache/dubbo-go/protocol" @@ -84,10 +84,10 @@ func TestGenericFilter_Invoke_With_Default_TpsLimiter_Not_Allow(t *testing.T) { }) mockResult := &protocol.RPCResult{} - mockRejectedHandler := impl2.NewMockRejectedExecutionHandler(ctrl) + mockRejectedHandler := filterCommonImpl.NewMockRejectedExecutionHandler(ctrl) mockRejectedHandler.EXPECT().RejectedExecution(gomock.Any(), gomock.Any()).Return(mockResult).Times(1) - extension.SetRejectedExecutionHandler(constant.DEFAULT_KEY, func() common2.RejectedExecutionHandler { + extension.SetRejectedExecutionHandler(constant.DEFAULT_KEY, func() filterCommon.RejectedExecutionHandler { return mockRejectedHandler })