.withExecutionIsolationStrategy(isolation) .withExecutionIsolationSemaphoreMaxConcurrentRequests(0)) .setThreadPool(new HystrixThreadPool() {
.setCircuitBreaker(circuitBreaker) .setMetrics(circuitBreaker.metrics) .setThreadPool(new HystrixThreadPool() {
.setCircuitBreaker(circuitBreaker) .setMetrics(circuitBreaker.metrics) .setThreadPool(new HystrixThreadPool() {
public AbstractFlexibleTestHystrixObservableCommand(HystrixCommandKey commandKey, ExecutionIsolationStrategy isolationStrategy, AbstractTestHystrixCommand.ExecutionResult executionResult, int executionLatency, TestCircuitBreaker circuitBreaker, HystrixThreadPool threadPool, int timeout, CacheEnabled cacheEnabled, Object value, TryableSemaphore executionSemaphore, TryableSemaphore fallbackSemaphore, boolean circuitBreakerDisabled) { super(testPropsBuilder(circuitBreaker) .setCommandKey(commandKey) .setCircuitBreaker(circuitBreaker) .setMetrics(circuitBreaker.metrics) .setThreadPool(threadPool) .setCommandPropertiesDefaults(HystrixCommandPropertiesTest.getUnitTestPropertiesSetter() .withExecutionIsolationStrategy(isolationStrategy) .withExecutionTimeoutInMilliseconds(timeout) .withCircuitBreakerEnabled(!circuitBreakerDisabled)) .setExecutionSemaphore(executionSemaphore) .setFallbackSemaphore(fallbackSemaphore)); this.executionResult = executionResult; this.executionLatency = executionLatency; this.cacheEnabled = cacheEnabled; this.value = value; }
AbstractFlexibleTestHystrixCommand(HystrixCommandKey commandKey, ExecutionIsolationStrategy isolationStrategy, AbstractTestHystrixCommand.ExecutionResult executionResult, int executionLatency, TestCircuitBreaker circuitBreaker, HystrixThreadPool threadPool, int timeout, CacheEnabled cacheEnabled, Object value, TryableSemaphore executionSemaphore, TryableSemaphore fallbackSemaphore, boolean circuitBreakerDisabled) { super(testPropsBuilder(circuitBreaker) .setCommandKey(commandKey) .setCircuitBreaker(circuitBreaker) .setMetrics(circuitBreaker.metrics) .setThreadPool(threadPool) .setCommandPropertiesDefaults(HystrixCommandPropertiesTest.getUnitTestPropertiesSetter() .withExecutionIsolationStrategy(isolationStrategy) .withExecutionTimeoutInMilliseconds(timeout) .withCircuitBreakerEnabled(!circuitBreakerDisabled)) .setExecutionSemaphore(executionSemaphore) .setFallbackSemaphore(fallbackSemaphore)); this.executionResult = executionResult; this.executionLatency = executionLatency; this.cacheEnabled = cacheEnabled; this.value = value; }
private TestCommandRejection(HystrixCommandKey key, TestCircuitBreaker circuitBreaker, HystrixThreadPool threadPool, int sleepTime, int timeout, int fallbackBehavior) { super(testPropsBuilder() .setCommandKey(key) .setThreadPool(threadPool) .setCircuitBreaker(circuitBreaker) .setMetrics(circuitBreaker.metrics) .setCommandPropertiesDefaults(HystrixCommandPropertiesTest.getUnitTestPropertiesSetter().withExecutionTimeoutInMilliseconds(timeout))); this.fallbackBehavior = fallbackBehavior; this.sleepTime = sleepTime; }
private CommandWithCustomThreadPool(TestCircuitBreaker circuitBreaker, HystrixThreadPool threadPool, int sleepTime, HystrixCommandProperties.Setter properties) { super(testPropsBuilder().setThreadPool(threadPool).setCircuitBreaker(circuitBreaker).setMetrics(circuitBreaker.metrics).setCommandPropertiesDefaults(properties)); this.sleepTime = sleepTime; }