Skip to content
Snippets Groups Projects
Commit c9c10a0c authored by tiecheng's avatar tiecheng
Browse files

Merge branch 'develop' into feature/file_service_discovery

parents 29a1abb8 ddbead73
No related branches found
No related tags found
No related merge requests found
Showing
with 119 additions and 81 deletions
......@@ -44,7 +44,7 @@ func TestZoneWareInvokerWithPreferredSuccess(t *testing.T) {
//defer ctrl.Finish()
mockResult := &protocol.RPCResult{
Attrs: map[string]string{constant.PREFERRED_KEY: "true"},
Attrs: map[string]interface{}{constant.PREFERRED_KEY: "true"},
Rest: rest{tried: 0, success: true}}
var invokers []protocol.Invoker
......@@ -99,7 +99,7 @@ func TestZoneWareInvokerWithWeightSuccess(t *testing.T) {
invoker.EXPECT().Invoke(gomock.Any()).DoAndReturn(
func(invocation protocol.Invocation) protocol.Result {
return &protocol.RPCResult{
Attrs: map[string]string{constant.WEIGHT_KEY: w1},
Attrs: map[string]interface{}{constant.WEIGHT_KEY: w1},
Rest: rest{tried: 0, success: true}}
}).MaxTimes(100)
} else {
......@@ -107,7 +107,7 @@ func TestZoneWareInvokerWithWeightSuccess(t *testing.T) {
invoker.EXPECT().Invoke(gomock.Any()).DoAndReturn(
func(invocation protocol.Invocation) protocol.Result {
return &protocol.RPCResult{
Attrs: map[string]string{constant.WEIGHT_KEY: w2},
Attrs: map[string]interface{}{constant.WEIGHT_KEY: w2},
Rest: rest{tried: 0, success: true}}
}).MaxTimes(100)
}
......@@ -154,7 +154,7 @@ func TestZoneWareInvokerWithZoneSuccess(t *testing.T) {
invoker.EXPECT().Invoke(gomock.Any()).DoAndReturn(
func(invocation protocol.Invocation) protocol.Result {
return &protocol.RPCResult{
Attrs: map[string]string{constant.ZONE_KEY: zoneValue},
Attrs: map[string]interface{}{constant.ZONE_KEY: zoneValue},
Rest: rest{tried: 0, success: true}}
})
invokers = append(invokers, invoker)
......
......@@ -191,7 +191,6 @@ func (c *tagRouter) Process(event *config_center.ConfigChangeEvent) {
defer c.mutex.Unlock()
c.tagRouterRule = routerRule
c.ruleChanged = true
return
}
// URL gets the url of tagRouter
......@@ -362,7 +361,9 @@ func isAnyHost(addr string) bool {
func findTag(invocation protocol.Invocation, consumerUrl *common.URL) string {
tag, ok := invocation.Attachments()[constant.Tagkey]
if !ok {
tag = consumerUrl.GetParam(constant.Tagkey, "")
return consumerUrl.GetParam(constant.Tagkey, "")
} else if v, t := tag.(string); t {
return v
}
return tag
return ""
}
......@@ -145,12 +145,17 @@ func (p *Proxy) Implement(v common.RPCService) {
inv.SetAttachments(k, value)
}
// add user setAttachment
// add user setAttachment. It is compatibility with previous versions.
atm := invCtx.Value(constant.AttachmentKey)
if m, ok := atm.(map[string]string); ok {
for k, value := range m {
inv.SetAttachments(k, value)
}
} else if m2, ok2 := atm.(map[string]interface{}); ok2 {
// it is support to transfer map[string]interface{}. It refers to dubbo-java 2.7.
for k, value := range m2 {
inv.SetAttachments(k, value)
}
}
result := p.invoke.Invoke(invCtx, inv)
......
......@@ -24,6 +24,7 @@ import (
)
import (
"github.com/apache/dubbo-go/protocol/invocation"
perrors "github.com/pkg/errors"
"github.com/stretchr/testify/assert"
)
......@@ -32,6 +33,7 @@ import (
"github.com/apache/dubbo-go/common"
"github.com/apache/dubbo-go/common/constant"
"github.com/apache/dubbo-go/protocol"
"github.com/apache/dubbo-go/protocol/dubbo/hessian2"
)
type TestService struct {
......@@ -40,6 +42,7 @@ type TestService struct {
MethodThree func(int, bool) (interface{}, error)
MethodFour func(int, bool) (*interface{}, error) `dubbo:"methodFour"`
MethodFive func() error
MethodSix func(context.Context, string) (interface{}, error)
Echo func(interface{}, *interface{}) error
}
......@@ -120,3 +123,34 @@ func TestProxyImplement(t *testing.T) {
assert.Nil(t, s3.MethodOne)
}
func TestProxyImplementForContext(t *testing.T) {
invoker := &TestProxyInvoker{
BaseInvoker: *protocol.NewBaseInvoker(common.URL{}),
}
p := NewProxy(invoker, nil, map[string]string{constant.ASYNC_KEY: "false"})
s := &TestService{}
p.Implement(s)
attahments1 := make(map[string]interface{}, 4)
attahments1["k1"] = "v1"
attahments1["k2"] = "v2"
context := context.WithValue(context.Background(), constant.AttachmentKey, attahments1)
r, err := p.Get().(*TestService).MethodSix(context, "xxx")
v1 := r.(map[string]interface{})
assert.NoError(t, err)
assert.Equal(t, v1["TestProxyInvoker"], "TestProxyInvokerValue")
}
type TestProxyInvoker struct {
protocol.BaseInvoker
}
func (bi *TestProxyInvoker) Invoke(context context.Context, inv protocol.Invocation) protocol.Result {
rpcInv := inv.(*invocation.RPCInvocation)
mapV := inv.Attachments()
mapV["TestProxyInvoker"] = "TestProxyInvokerValue"
hessian2.ReflectResponse(mapV, rpcInv.Reply())
return &protocol.RPCResult{
Rest: inv.Arguments(),
}
}
......@@ -169,7 +169,7 @@ func (sm *serviceMap) GetService(protocol, name string) *Service {
return nil
}
// GetInterface gets an interface defination by interface name
// GetInterface gets an interface definition by interface name
func (sm *serviceMap) GetInterface(interfaceName string) []*Service {
sm.mutex.RLock()
defer sm.mutex.RUnlock()
......@@ -271,7 +271,7 @@ func (sm *serviceMap) UnRegister(interfaceName, protocol, serviceId string) erro
sm.mutex.Lock()
defer sm.mutex.Unlock()
sm.interfaceMap[interfaceName] = make([]*Service, 0, len(svrs))
for i, _ := range svrs {
for i := range svrs {
if i != index {
sm.interfaceMap[interfaceName] = append(sm.interfaceMap[interfaceName], svrs[i])
}
......
......@@ -222,7 +222,7 @@ func NewURL(urlString string, opts ...option) (URL, error) {
}
// rawUrlString = "//" + rawUrlString
if strings.Index(rawUrlString, "//") < 0 {
if !strings.Contains(rawUrlString, "//") {
t := URL{baseUrl: baseUrl{}}
for _, opt := range opts {
opt(&t)
......
......@@ -78,15 +78,8 @@ func getKeyPrefix(val reflect.Value) []string {
} else {
prefix = val.MethodByName(configPrefixMethod).Call(nil)[0].String()
}
var retPrefixes []string
for _, pfx := range strings.Split(prefix, "|") {
retPrefixes = append(retPrefixes, pfx)
}
return retPrefixes
return strings.Split(prefix, "|")
}
func getPtrElement(v reflect.Value) reflect.Value {
......@@ -216,12 +209,9 @@ func setFieldValue(val reflect.Value, id reflect.Value, config *config.InmemoryC
prefix := s.MethodByName("Prefix").Call(nil)[0].String()
for _, pfx := range strings.Split(prefix, "|") {
m := config.GetSubProperty(pfx)
if m != nil {
for k := range m {
f.SetMapIndex(reflect.ValueOf(k), reflect.New(f.Type().Elem().Elem()))
}
for k := range m {
f.SetMapIndex(reflect.ValueOf(k), reflect.New(f.Type().Elem().Elem()))
}
}
}
......
......@@ -141,19 +141,18 @@ func loadConsumerConfig() {
// wait for invoker is available, if wait over default 3s, then panic
var count int
checkok := true
for {
checkok := true
for _, refconfig := range consumerConfig.References {
if (refconfig.Check != nil && *refconfig.Check) ||
(refconfig.Check == nil && consumerConfig.Check != nil && *consumerConfig.Check) ||
(refconfig.Check == nil && consumerConfig.Check == nil) { // default to true
if refconfig.invoker != nil &&
!refconfig.invoker.IsAvailable() {
if refconfig.invoker != nil && !refconfig.invoker.IsAvailable() {
checkok = false
count++
if count > maxWait {
errMsg := fmt.Sprintf("Failed to check the status of the service %v . No provider available for the service to the consumer use dubbo version %v", refconfig.InterfaceName, constant.Version)
errMsg := fmt.Sprintf("Failed to check the status of the service %v. No provider available for the service to the consumer use dubbo version %v", refconfig.InterfaceName, constant.Version)
logger.Error(errMsg)
panic(errMsg)
}
......@@ -161,14 +160,13 @@ func loadConsumerConfig() {
break
}
if refconfig.invoker == nil {
logger.Warnf("The interface %s invoker not exist , may you should check your interface config.", refconfig.InterfaceName)
logger.Warnf("The interface %s invoker not exist, may you should check your interface config.", refconfig.InterfaceName)
}
}
}
if checkok {
break
}
checkok = true
}
}
......
......@@ -60,8 +60,8 @@ type ConsumerConfig struct {
References map[string]*ReferenceConfig `yaml:"references" json:"references,omitempty" property:"references"`
ProtocolConf interface{} `yaml:"protocol_conf" json:"protocol_conf,omitempty" property:"protocol_conf"`
FilterConf interface{} `yaml:"filter_conf" json:"filter_conf,omitempty" property:"filter_conf" `
ShutdownConfig *ShutdownConfig `yaml:"shutdown_conf" json:"shutdown_conf,omitempty" property:"shutdown_conf" `
FilterConf interface{} `yaml:"filter_conf" json:"filter_conf,omitempty" property:"filter_conf"`
ShutdownConfig *ShutdownConfig `yaml:"shutdown_conf" json:"shutdown_conf,omitempty" property:"shutdown_conf"`
ConfigType map[string]string `yaml:"config_type" json:"config_type,omitempty" property:"config_type"`
}
......
......@@ -43,9 +43,9 @@ type ProviderConfig struct {
ProxyFactory string `yaml:"proxy_factory" default:"default" json:"proxy_factory,omitempty" property:"proxy_factory"`
Services map[string]*ServiceConfig `yaml:"services" json:"services,omitempty" property:"services"`
Protocols map[string]*ProtocolConfig `yaml:"protocols" json:"protocols,omitempty" property:"protocols"`
ProtocolConf interface{} `yaml:"protocol_conf" json:"protocol_conf,omitempty" property:"protocol_conf" `
FilterConf interface{} `yaml:"filter_conf" json:"filter_conf,omitempty" property:"filter_conf" `
ShutdownConfig *ShutdownConfig `yaml:"shutdown_conf" json:"shutdown_conf,omitempty" property:"shutdown_conf" `
ProtocolConf interface{} `yaml:"protocol_conf" json:"protocol_conf,omitempty" property:"protocol_conf"`
FilterConf interface{} `yaml:"filter_conf" json:"filter_conf,omitempty" property:"filter_conf"`
ShutdownConfig *ShutdownConfig `yaml:"shutdown_conf" json:"shutdown_conf,omitempty" property:"shutdown_conf"`
ConfigType map[string]string `yaml:"config_type" json:"config_type,omitempty" property:"config_type"`
Registry *RegistryConfig `yaml:"registry" json:"registry,omitempty" property:"registry"`
......
......@@ -251,5 +251,4 @@ func (c *ReferenceConfig) GenericLoad(id string) {
c.id = id
c.Refer(genericService)
c.Implement(genericService)
return
}
......@@ -133,7 +133,7 @@ func getRandomPort(protocolConfigs []*ProtocolConfig) *list.List {
tcp, err := gxnet.ListenOnTCPRandomPort(proto.Ip)
if err != nil {
panic(perrors.New(fmt.Sprintf("Get tcp port error,err is {%v}", err)))
panic(perrors.New(fmt.Sprintf("Get tcp port error, err is {%v}", err)))
}
defer tcp.Close()
ports.PushBack(strings.Split(tcp.Addr().String(), ":")[1])
......@@ -145,14 +145,14 @@ func getRandomPort(protocolConfigs []*ProtocolConfig) *list.List {
func (c *ServiceConfig) Export() error {
// TODO: config center start here
// TODO:delay export
// TODO: delay export
if c.unexported != nil && c.unexported.Load() {
err := perrors.Errorf("The service %v has already unexported! ", c.InterfaceName)
err := perrors.Errorf("The service %v has already unexported!", c.InterfaceName)
logger.Errorf(err.Error())
return err
}
if c.unexported != nil && c.exported.Load() {
logger.Warnf("The service %v has already exported! ", c.InterfaceName)
logger.Warnf("The service %v has already exported!", c.InterfaceName)
return nil
}
......@@ -160,23 +160,23 @@ func (c *ServiceConfig) Export() error {
urlMap := c.getUrlMap()
protocolConfigs := loadProtocol(c.Protocol, c.Protocols)
if len(protocolConfigs) == 0 {
logger.Warnf("The service %v's '%v' protocols don't has right protocolConfigs ", c.InterfaceName, c.Protocol)
logger.Warnf("The service %v's '%v' protocols don't has right protocolConfigs", c.InterfaceName, c.Protocol)
return nil
}
ports := getRandomPort(protocolConfigs)
nextPort := ports.Front()
proxyFactory := extension.GetProxyFactory(providerConfig.ProxyFactory)
for _, proto := range protocolConfigs {
// registry the service reflect
methods, err := common.ServiceMap.Register(c.InterfaceName, proto.Name, c.rpcService)
if err != nil {
formatErr := perrors.Errorf("The service %v export the protocol %v error! Error message is %v .", c.InterfaceName, proto.Name, err.Error())
formatErr := perrors.Errorf("The service %v export the protocol %v error! Error message is %v.", c.InterfaceName, proto.Name, err.Error())
logger.Errorf(formatErr.Error())
return formatErr
}
port := proto.Port
if len(proto.Port) == 0 {
port = nextPort.Value.(string)
nextPort = nextPort.Next()
......@@ -196,33 +196,31 @@ func (c *ServiceConfig) Export() error {
ivkURL.AddParam(constant.Tagkey, c.Tag)
}
var exporter protocol.Exporter
if len(regUrls) > 0 {
c.cacheMutex.Lock()
if c.cacheProtocol == nil {
logger.Infof(fmt.Sprintf("First load the registry protocol, url is {%v}!", ivkURL))
c.cacheProtocol = extension.GetProtocol("registry")
}
c.cacheMutex.Unlock()
for _, regUrl := range regUrls {
regUrl.SubURL = ivkURL
c.cacheMutex.Lock()
if c.cacheProtocol == nil {
logger.Infof(fmt.Sprintf("First load the registry protocol , url is {%v}!", ivkURL))
c.cacheProtocol = extension.GetProtocol("registry")
}
c.cacheMutex.Unlock()
invoker := extension.GetProxyFactory(providerConfig.ProxyFactory).GetInvoker(*regUrl)
exporter = c.cacheProtocol.Export(invoker)
invoker := proxyFactory.GetInvoker(*regUrl)
exporter := c.cacheProtocol.Export(invoker)
if exporter == nil {
panic(perrors.New(fmt.Sprintf("Registry protocol new exporter error,registry is {%v},url is {%v}", regUrl, ivkURL)))
return perrors.New(fmt.Sprintf("Registry protocol new exporter error, registry is {%v}, url is {%v}", regUrl, ivkURL))
}
c.exporters = append(c.exporters, exporter)
}
} else {
invoker := extension.GetProxyFactory(providerConfig.ProxyFactory).GetInvoker(*ivkURL)
exporter = extension.GetProtocol(protocolwrapper.FILTER).Export(invoker)
invoker := proxyFactory.GetInvoker(*ivkURL)
exporter := extension.GetProtocol(protocolwrapper.FILTER).Export(invoker)
if exporter == nil {
panic(perrors.New(fmt.Sprintf("Filter protocol without registry new exporter error,url is {%v}", ivkURL)))
return perrors.New(fmt.Sprintf("Filter protocol without registry new exporter error, url is {%v}", ivkURL))
}
c.exporters = append(c.exporters, exporter)
}
c.exporters = append(c.exporters, exporter)
}
c.exported.Store(true)
return nil
......@@ -314,7 +312,6 @@ func (c *ServiceConfig) getUrlMap() url.Values {
urlMap.Set(constant.EXECUTE_LIMIT_KEY, v.ExecuteLimit)
urlMap.Set(constant.EXECUTE_REJECTED_EXECUTION_HANDLER_KEY, v.ExecuteLimitRejectedHandler)
}
return urlMap
......
......@@ -110,7 +110,7 @@ func (c *overrideConfigurator) configureIfMatchInternal(url *common.URL) {
func (c *overrideConfigurator) configureIfMatch(host string, url *common.URL) {
if constant.ANYHOST_VALUE == c.configuratorUrl.Ip || host == c.configuratorUrl.Ip {
providers := c.configuratorUrl.GetParam(constant.OVERRIDE_PROVIDERS_KEY, "")
if len(providers) == 0 || strings.Index(providers, url.Location) >= 0 || strings.Index(providers, constant.ANYHOST_VALUE) >= 0 {
if len(providers) == 0 || strings.Contains(providers, url.Location) || strings.Contains(providers, constant.ANYHOST_VALUE) {
c.configureIfMatchInternal(url)
}
}
......
......@@ -105,13 +105,27 @@ func (ef *AccessLogFilter) logIntoChannel(accessLogData AccessLogData) {
func (ef *AccessLogFilter) buildAccessLogData(_ protocol.Invoker, invocation protocol.Invocation) map[string]string {
dataMap := make(map[string]string, 16)
attachments := invocation.Attachments()
dataMap[constant.INTERFACE_KEY] = attachments[constant.INTERFACE_KEY]
dataMap[constant.METHOD_KEY] = invocation.MethodName()
dataMap[constant.VERSION_KEY] = attachments[constant.VERSION_KEY]
dataMap[constant.GROUP_KEY] = attachments[constant.GROUP_KEY]
dataMap[constant.TIMESTAMP_KEY] = time.Now().Format(MessageDateLayout)
dataMap[constant.LOCAL_ADDR], _ = attachments[constant.LOCAL_ADDR]
dataMap[constant.REMOTE_ADDR], _ = attachments[constant.REMOTE_ADDR]
if v, ok := attachments[constant.INTERFACE_KEY]; ok && v != nil {
dataMap[constant.INTERFACE_KEY] = v.(string)
}
if v, ok := attachments[constant.METHOD_KEY]; ok && v != nil {
dataMap[constant.METHOD_KEY] = v.(string)
}
if v, ok := attachments[constant.VERSION_KEY]; ok && v != nil {
dataMap[constant.VERSION_KEY] = v.(string)
}
if v, ok := attachments[constant.GROUP_KEY]; ok && v != nil {
dataMap[constant.GROUP_KEY] = v.(string)
}
if v, ok := attachments[constant.TIMESTAMP_KEY]; ok && v != nil {
dataMap[constant.TIMESTAMP_KEY] = v.(string)
}
if v, ok := attachments[constant.LOCAL_ADDR]; ok && v != nil {
dataMap[constant.LOCAL_ADDR] = v.(string)
}
if v, ok := attachments[constant.REMOTE_ADDR]; ok && v != nil {
dataMap[constant.REMOTE_ADDR] = v.(string)
}
if len(invocation.Arguments()) > 0 {
builder := strings.Builder{}
......
......@@ -45,7 +45,7 @@ func TestAccessLogFilter_Invoke_Not_Config(t *testing.T) {
"service.filter=echo%2Ctoken%2Caccesslog&timestamp=1569153406&token=934804bf-b007-4174-94eb-96e3e1d60cc7&version=&warmup=100")
invoker := protocol.NewBaseInvoker(url)
attach := make(map[string]string, 10)
attach := make(map[string]interface{}, 10)
inv := invocation.NewRPCInvocation("MethodName", []interface{}{"OK", "Hello"}, attach)
accessLogFilter := GetAccessLogFilter()
......@@ -64,7 +64,7 @@ func TestAccessLogFilterInvokeDefaultConfig(t *testing.T) {
"service.filter=echo%2Ctoken%2Caccesslog&timestamp=1569153406&token=934804bf-b007-4174-94eb-96e3e1d60cc7&version=&warmup=100")
invoker := protocol.NewBaseInvoker(url)
attach := make(map[string]string, 10)
attach := make(map[string]interface{}, 10)
attach[constant.VERSION_KEY] = "1.0"
attach[constant.GROUP_KEY] = "MyGroup"
inv := invocation.NewRPCInvocation("MethodName", []interface{}{"OK", "Hello"}, attach)
......
......@@ -37,7 +37,7 @@ import (
)
func TestActiveFilterInvoke(t *testing.T) {
invoc := invocation.NewRPCInvocation("test", []interface{}{"OK"}, make(map[string]string, 0))
invoc := invocation.NewRPCInvocation("test", []interface{}{"OK"}, make(map[string]interface{}, 0))
url, _ := common.NewURL("dubbo://192.168.10.10:20000/com.ikurento.user.UserProvider")
filter := ActiveFilter{}
ctrl := gomock.NewController(t)
......@@ -53,7 +53,7 @@ func TestActiveFilterInvoke(t *testing.T) {
func TestActiveFilterOnResponse(t *testing.T) {
c := protocol.CurrentTimeMillis()
elapsed := 100
invoc := invocation.NewRPCInvocation("test", []interface{}{"OK"}, map[string]string{
invoc := invocation.NewRPCInvocation("test", []interface{}{"OK"}, map[string]interface{}{
dubboInvokeStartTime: strconv.FormatInt(c-int64(elapsed), 10),
})
url, _ := common.NewURL("dubbo://192.168.10.10:20000/com.ikurento.user.UserProvider")
......
......@@ -52,7 +52,7 @@ func TestDefaultAuthenticator_Authenticate(t *testing.T) {
var authenticator = &DefaultAuthenticator{}
invcation := invocation.NewRPCInvocation("test", parmas, map[string]string{
invcation := invocation.NewRPCInvocation("test", parmas, map[string]interface{}{
constant.REQUEST_SIGNATURE_KEY: signature,
constant.CONSUMER: "test",
constant.REQUEST_TIMESTAMP_KEY: requestTime,
......@@ -61,7 +61,7 @@ func TestDefaultAuthenticator_Authenticate(t *testing.T) {
err := authenticator.Authenticate(invcation, &testurl)
assert.Nil(t, err)
// modify the params
invcation = invocation.NewRPCInvocation("test", parmas[:1], map[string]string{
invcation = invocation.NewRPCInvocation("test", parmas[:1], map[string]interface{}{
constant.REQUEST_SIGNATURE_KEY: signature,
constant.CONSUMER: "test",
constant.REQUEST_TIMESTAMP_KEY: requestTime,
......@@ -119,7 +119,7 @@ func Test_getAccessKeyPairFailed(t *testing.T) {
func Test_getSignatureWithinParams(t *testing.T) {
testurl, _ := common.NewURL("dubbo://127.0.0.1:20000/com.ikurento.user.UserProvider?interface=com.ikurento.user.UserProvider&group=gg&version=2.6.0")
testurl.SetParam(constant.PARAMTER_SIGNATURE_ENABLE_KEY, "true")
inv := invocation.NewRPCInvocation("test", []interface{}{"OK"}, map[string]string{
inv := invocation.NewRPCInvocation("test", []interface{}{"OK"}, map[string]interface{}{
"": "",
})
secret := "dubbo"
......
......@@ -54,7 +54,7 @@ func TestProviderAuthFilter_Invoke(t *testing.T) {
requestTime := strconv.Itoa(int(time.Now().Unix() * 1000))
signature, _ := getSignature(&url, inv, secret, requestTime)
inv = invocation.NewRPCInvocation("test", []interface{}{"OK"}, map[string]string{
inv = invocation.NewRPCInvocation("test", []interface{}{"OK"}, map[string]interface{}{
constant.REQUEST_SIGNATURE_KEY: signature,
constant.CONSUMER: "test",
constant.REQUEST_TIMESTAMP_KEY: requestTime,
......
......@@ -36,7 +36,7 @@ import (
func TestExecuteLimitFilterInvokeIgnored(t *testing.T) {
methodName := "hello"
invoc := invocation.NewRPCInvocation(methodName, []interface{}{"OK"}, make(map[string]string, 0))
invoc := invocation.NewRPCInvocation(methodName, []interface{}{"OK"}, make(map[string]interface{}, 0))
invokeUrl := common.NewURLWithOptions(
common.WithParams(url.Values{}),
......@@ -51,7 +51,7 @@ func TestExecuteLimitFilterInvokeIgnored(t *testing.T) {
func TestExecuteLimitFilterInvokeConfigureError(t *testing.T) {
methodName := "hello1"
invoc := invocation.NewRPCInvocation(methodName, []interface{}{"OK"}, make(map[string]string, 0))
invoc := invocation.NewRPCInvocation(methodName, []interface{}{"OK"}, make(map[string]interface{}, 0))
invokeUrl := common.NewURLWithOptions(
common.WithParams(url.Values{}),
......@@ -68,7 +68,7 @@ func TestExecuteLimitFilterInvokeConfigureError(t *testing.T) {
func TestExecuteLimitFilterInvoke(t *testing.T) {
methodName := "hello1"
invoc := invocation.NewRPCInvocation(methodName, []interface{}{"OK"}, make(map[string]string, 0))
invoc := invocation.NewRPCInvocation(methodName, []interface{}{"OK"}, make(map[string]interface{}, 0))
invokeUrl := common.NewURLWithOptions(
common.WithParams(url.Values{}),
......
......@@ -39,7 +39,7 @@ import (
)
func TestGenericFilterInvoke(t *testing.T) {
invoc := invocation.NewRPCInvocation("GetUser", []interface{}{"OK"}, make(map[string]string, 0))
invoc := invocation.NewRPCInvocation("GetUser", []interface{}{"OK"}, make(map[string]interface{}, 0))
invokeUrl := common.NewURLWithOptions(
common.WithParams(url.Values{}))
......
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