erdengk commented on pull request #2985:
URL: 
https://github.com/apache/incubator-shenyu/pull/2985#issuecomment-1059771424


   @JooKS-me 
   This is my first time writing integration tests for a plugin. I learned test 
code for other plugins.
   But I ran into some problems. I can't implement circuit breaker by 
configuring HystrixPlugin.
   Currently its configuration code is as follows
   
   ```
      HystrixHandle hystrixHandle = new HystrixHandle();
           hystrixHandle.setGroupKey("contextPath");
           hystrixHandle.setCommandKey("commandKey");
           hystrixHandle.setMaxConcurrentRequests(0);
           hystrixHandle.setErrorThresholdPercentage(0);
           hystrixHandle.setRequestVolumeThreshold(0);
           hystrixHandle.setSleepWindowInMilliseconds(1);
           hystrixHandle.setTimeout(Constants.TIME_OUT);
           hystrixHandle.setCallBackUri(TEST_HYSTRIX_BAD_REQUEST_PATH);
           HystrixHandle.HystrixThreadPoolConfig hystrixThreadPoolConfig = new 
HystrixHandle.HystrixThreadPoolConfig();
           hystrixThreadPoolConfig.setCoreSize(0);
           hystrixThreadPoolConfig.setMaximumSize(0);
           hystrixThreadPoolConfig.setMaxQueueSize(0);
           hystrixHandle.setHystrixThreadPoolConfig(hystrixThreadPoolConfig);
   ```
   
   I learned how Hystrix works. In my understanding, if the 
`MaxConcurrentRequests` parameter is set to 1 or 0 , the circuit breaker will 
be triggered, but it is not actually triggered. 
   Maybe there is something wrong with my settings? 
   I've tried for a long time and can't solve this problem, please help me.🙏
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to