You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/09/11 15:08:53 UTC

[GitHub] zonghaishang opened a new issue #2489: MockClusterInvoker provides local forced mock,I tested it locally, but it doesn't work.

zonghaishang opened a new issue #2489: MockClusterInvoker provides local forced mock,I tested it locally, but it doesn't work.
URL: https://github.com/apache/incubator-dubbo/issues/2489
 
 
   - [x] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
   - [x] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 2.7.0
   * Operating System version: 2.7.0
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   1. Here is demo: Here is demo: https://github.com/dubbo/dubbo-samples/tree/master/dubbo-samples-mock
   2. change consumer configuraton: <dubbo:reference id="demoService" check="false" interface="com.alibaba.dubbo.samples.mock.api.DemoService" mock="force”/>
   
   Pls. provide [GitHub address] to reproduce this issue.
   
   ### Expected Result
   
   force mock should be trigged.
   
   ### Actual Result
   
   start failed.
   
   I have checked code(MockClusterInvoker) :
   
   ``` java
   @Override
   public Result invoke(Invocation invocation) throws RpcException {
       // ….
       else if (value.startsWith("force")) {
           if (logger.isWarnEnabled()) {
               logger.info("force-mock: " + invocation.getMethodName() + " force-mock enabled , url : " + directory.getUrl());
           }
           //force:direct mock
           result = doMockInvoke(invocation, null);
       } 
          // ….
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org