public override IHystrixCommandOptions GetCommandOptions(IHystrixCommandKey commandKey, IHystrixCommandOptions builder) { if (builder == null) { builder = HystrixCommandOptionsTest.GetUnitTestOptions(); } return(builder); }
private static HystrixCommandOptions GetUnitTestSettings(string commandKey) { HystrixCommandOptions opts = HystrixCommandOptionsTest.GetUnitTestOptions(); opts.GroupKey = HystrixCommandGroupKeyDefault.AsKey("Command"); opts.CommandKey = HystrixCommandKeyDefault.AsKey(commandKey); opts.ExecutionTimeoutInMilliseconds = 1000; opts.CircuitBreakerRequestVolumeThreshold = 20; return(opts); }
protected static HystrixCommandOptions Options(string groupKey, string commandKey, int requestVolumeThreshold, int sleepWindow) { var opts = HystrixCommandOptionsTest.GetUnitTestOptions(); opts.GroupKey = HystrixCommandGroupKeyDefault.AsKey(groupKey); opts.CommandKey = HystrixCommandKeyDefault.AsKey(commandKey); opts.ExecutionTimeoutInMilliseconds = 500; opts.CircuitBreakerRequestVolumeThreshold = requestVolumeThreshold; opts.CircuitBreakerSleepWindowInMilliseconds = sleepWindow; return(opts); }
public TestCircuitBreaker(IHystrixCommandKey commandKey) { metrics = GetMetrics(commandKey, HystrixCommandOptionsTest.GetUnitTestOptions()); forceShortCircuit = false; }
public TestCircuitBreaker() { this.metrics = HystrixCircuitBreakerTest.GetMetrics(HystrixCommandOptionsTest.GetUnitTestOptions()); forceShortCircuit = false; }
public TestCommandBuilder(ExecutionIsolationStrategy isolationStrategy) { this.CommandPropertiesDefaults = HystrixCommandOptionsTest.GetUnitTestOptions(); this.CommandPropertiesDefaults.ExecutionIsolationStrategy = isolationStrategy; }