Re: Local forced trigger mock does not take effect

2018-09-19 Thread Zonghai Shang
> Does someone knows why Spring doesn’t support property value containing special character? and how to solve it?[1] Spring does not care about tag specific values, special characters are also supported Best regards, yiji jun liu 于2018年9月19日周三 下午4:11写道: > Sorry, I just have time to check this

Re: Local forced trigger mock does not take effect

2018-09-19 Thread jun liu
Sorry, I just have time to check this problem, it turns out I am wrong in the previous email. I think what Zonghai is suggesting should be supported, we should support and distinguish configuration prefixed with ‘force:’ and ‘fail:’, >>> 4. mock=force >>> 6. mock=force:xxx.XxService >>> 7.

Re: Local forced trigger mock does not take effect

2018-09-13 Thread Zonghai Shang
>> 4. mock=force >> 6. mock=force:xxx.XxService >> 7. mock=fail >> 8. mock=fail:xxx.XxService > Not support at present. But I think there's no need to support these kind of usage as they can be supported in other forms. > For example, mock=true and mock=xxx.XxService is enough to cover. > -1 to

Re: Local forced trigger mock does not take effect

2018-09-13 Thread jun liu
> 1. mock=true > 2. mock=xxx.XxService > 3. mock=return null Double checked, they’re already supported XML and .properties and documentation is good. > 4. mock=force > 6. mock=force:xxx.XxService > 7. mock=fail > 8. mock=fail:xxx.XxService Not support at present. But I think there's no need

Re: Local forced trigger mock does not take effect

2018-09-12 Thread kirito
Hi,Ian.luo and community I has debugged for a while and probably understand the workflow of mock in dubbo, what confused me was that > I know dubbo was intended to implement `fail:`,`force:`,`throw` these > functions(from the workflow of dubbo source code), but I can’t find the > description

Re: Local forced trigger mock does not take effect

2018-09-12 Thread Ian Luo
Jingfeng, Further more, is there a need to provide support for > `fail:`,`force:`,`throw`? What the behavior they should own? > I think 'fail:', 'force:' should work, pls. check the code here [1]. What unexpected behavior did you see? I have not tried it out, but it looks we have the

Re: Local forced trigger mock does not take effect

2018-09-12 Thread kirito
Hi I have a try right now,it was very strange. Works very well, but I think the blank is a illegal character too. As exception says : > invalid mock=“" contain illegal character, only digit, letter, '-', '_' > and '.' is legal. And I search for the dubbo source code find that in

Re: Local forced trigger mock does not take effect

2018-09-11 Thread Zonghai Shang
I have found it , I will fix it later. yiji jun liu 于2018年9月12日周三 下午12:45写道: > > >> 2. mock=“force:return xxx”, directly specify the return value you want. > > This may be the case you want to use, but I think you just forget the > mock > > value you want. > > > > It does’t work, cause: > >

Re: Local forced trigger mock does not take effect

2018-09-11 Thread jun liu
>> 2. mock=“force:return xxx”, directly specify the return value you want. > This may be the case you want to use, but I think you just forget the mock > value you want. > > It does’t work, cause: > PropertyAccessException 1: > org.springframework.beans.MethodInvocationException: Property 'mock'

Re: Local forced trigger mock does not take effect

2018-09-11 Thread Zonghai Shang
> 1. Improve the documentation > 2. Consider the configuration of xml compatible with the configuration of the override protocol I agree, maybe a pull request to fix it. Best regards, yiji yuhang xiu 于2018年9月12日周三 上午10:36写道: > Hi guys, > > I also encountered this confusion when I configured

Re: Local forced trigger mock does not take effect

2018-09-11 Thread yuhang xiu
Hi guys, I also encountered this confusion when I configured the mock in xml. Now it seems that the form of mock=force:return xxx can only be used when dynamically configured using the override protocol, which does not match the configuration of the xml. I think we need to do one of the

Re: Local forced trigger mock does not take effect

2018-09-11 Thread Zonghai Shang
> 1. mock=“true”, this will direct the to the default mock implementation with a name convention like DemoServiceMock. > 3. mock=“org.apache.dubbo.xxx.xxxMock”, specify the class where your mock logic is located. mock=“org.apache.dubbo.xxx.xxxMock” , only throw RpcException to execute the mock,

Re: Local forced trigger mock does not take effect

2018-09-11 Thread Ian Luo
I did a quick check in samples project, and it did have samples to demonstrate mock functionality. Pls. ignore my last email. On Wed, Sep 12, 2018 at 10:19 AM Ian Luo wrote: > Jun, > > Are you suggesting the mock behavior works as expected? If so, we may > consider to add the corresponding

Re: Local forced trigger mock does not take effect

2018-09-11 Thread Ian Luo
Jun, Are you suggesting the mock behavior works as expected? If so, we may consider to add the corresponding samples if we have done it yet. Thanks, -Ian. On Wed, Sep 12, 2018 at 8:56 AM jun liu wrote: > > > interface="com.alibaba.dubbo.samples.mock.api.DemoService" mock="force”/> > > As

Re: Local forced trigger mock does not take effect

2018-09-11 Thread jun liu
> interface="com.alibaba.dubbo.samples.mock.api.DemoService" mock="force”/> As far as I can describe now, I think you can use: 1. mock=“true”, this will direct the to the default mock implementation with a name convention like DemoServiceMock. 2. mock=“force:return xxx”, directly specify the

Re: Local forced trigger mock does not take effect

2018-09-11 Thread Zonghai Shang
Hi lan luo, Yeah, I have recorded and tracked, refer : https://github.com/apache/incubator-dubbo/issues/2489 Thanks for your reply, yiji Ian Luo 于2018年9月11日周二 下午11:00写道: > ZhongHai, > > Would you mind to fire an issue on GitHub? > > Thanks, > -Ian. > > > On Tue, Sep 11, 2018 at 4:32 PM

Re: Local forced trigger mock does not take effect

2018-09-11 Thread Ian Luo
ZhongHai, Would you mind to fire an issue on GitHub? Thanks, -Ian. On Tue, Sep 11, 2018 at 4:32 PM Zonghai Shang wrote: > Sorry, invoke refer > here: > com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker#invoke > > Zonghai Shang 于2018年9月11日周二 下午4:31写道: > > > Hi, > > > >

Re: Local forced trigger mock does not take effect

2018-09-11 Thread Zonghai Shang
Sorry, invoke refer here: com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker#invoke Zonghai Shang 于2018年9月11日周二 下午4:31写道: > Hi, > > MockClusterInvoker provides local forced mock,I tested it locally, but it > doesn't work. > > @Override > public Result invoke(Invocation invocation)