@Override public HystrixProperty<Integer> metricsRollingStatisticalWindowBuckets() { return HystrixProperty.Factory.asProperty(builder.getMetricsRollingStatisticalWindowBuckets()); }
@Override public HystrixProperty<Boolean> executionTimeoutEnabled() { return HystrixProperty.Factory.asProperty(builder.getExecutionTimeoutEnabled()); }
@Override public HystrixProperty<Integer> executionIsolationSemaphoreMaxConcurrentRequests() { return HystrixProperty.Factory.asProperty(builder.getExecutionIsolationSemaphoreMaxConcurrentRequests()); }
@Override public HystrixProperty<Integer> circuitBreakerSleepWindowInMilliseconds() { return HystrixProperty.Factory.asProperty(builder.getCircuitBreakerSleepWindowInMilliseconds()); }
@Override public HystrixProperty<Integer> circuitBreakerRequestVolumeThreshold() { return HystrixProperty.Factory.asProperty(builder.getCircuitBreakerRequestVolumeThreshold()); }
@Override public HystrixProperty<Integer> timerDelayInMilliseconds() { return HystrixProperty.Factory.asProperty(builder.timerDelayInMilliseconds); }
@Override public HystrixProperty<Integer> metricsRollingPercentileWindowBuckets() { return HystrixProperty.Factory.asProperty(builder.getMetricsRollingPercentileWindowBuckets()); }
@Override public HystrixProperty<Boolean> executionIsolationThreadInterruptOnFutureCancel() { return HystrixProperty.Factory.asProperty(builder.getExecutionIsolationThreadInterruptOnFutureCancel()); }
@Override public HystrixProperty<ExecutionIsolationStrategy> executionIsolationStrategy() { return HystrixProperty.Factory.asProperty(builder.getExecutionIsolationStrategy()); }
@Override public HystrixProperty<Boolean> circuitBreakerForceClosed() { return HystrixProperty.Factory.asProperty(builder.getCircuitBreakerForceClosed()); }
@Override public HystrixProperty<Integer> keepAliveTimeMinutes() { return HystrixProperty.Factory.asProperty(builder.getKeepAliveTimeMinutes()); }
@Test public void testNested5() { HystrixProperty<String> nullValue = Factory.nullProperty(); HystrixProperty<String> a = Factory.asProperty(nullValue, null); @SuppressWarnings("unchecked") HystrixProperty<String> withDefault = Factory.asProperty(a, Factory.asProperty("b")); assertEquals("b", withDefault.get()); }
@Test public void testNested3() { HystrixProperty<String> nullValue = Factory.nullProperty(); HystrixProperty<String> a = Factory.asProperty(nullValue, "a"); HystrixProperty<String> withDefault = Factory.asProperty(a, "b"); assertEquals("a", withDefault.get()); }
@Test public void testSeries2() { HystrixProperty<String> nullValue = Factory.nullProperty(); HystrixProperty<String> a = Factory.asProperty(nullValue, null); @SuppressWarnings("unchecked") HystrixProperty<String> withDefault = Factory.asProperty(a, nullValue, Factory.asProperty("b"), nullValue, Factory.asProperty("c")); assertEquals("b", withDefault.get()); }
@Test public void testSeries1() { HystrixProperty<String> nullValue = Factory.nullProperty(); HystrixProperty<String> a = Factory.asProperty(nullValue, null); @SuppressWarnings("unchecked") HystrixProperty<String> withDefault = Factory.asProperty(a, nullValue, nullValue, Factory.asProperty("b")); assertEquals("b", withDefault.get()); }
@Test public void testNested2() { HystrixProperty<String> nullValue = Factory.nullProperty(); HystrixProperty<String> withDefault = Factory.asProperty(nullValue, "b"); assertEquals("b", withDefault.get()); }
C getCommand(ExecutionIsolationStrategy isolationStrategy, ExecutionResult executionResult, int executionLatency, FallbackResult fallbackResult, int fallbackLatency, HystrixCircuitBreakerTest.TestCircuitBreaker circuitBreaker, HystrixThreadPool threadPool, int timeout, CacheEnabled cacheEnabled, Object value, int executionSemaphoreCount, int fallbackSemaphoreCount, boolean circuitBreakerDisabled) { AbstractCommand.TryableSemaphoreActual executionSemaphore = new AbstractCommand.TryableSemaphoreActual(HystrixProperty.Factory.asProperty(executionSemaphoreCount)); AbstractCommand.TryableSemaphoreActual fallbackSemaphore = new AbstractCommand.TryableSemaphoreActual(HystrixProperty.Factory.asProperty(fallbackSemaphoreCount)); return getCommand(isolationStrategy, executionResult, executionLatency, fallbackResult, fallbackLatency, circuitBreaker, threadPool, timeout, cacheEnabled, value, executionSemaphore, fallbackSemaphore, circuitBreakerDisabled); }
@Test public void testNested1() { HystrixProperty<String> a = Factory.asProperty("a"); assertEquals("a", a.get()); HystrixProperty<String> aWithDefault = Factory.asProperty(a, "b"); assertEquals("a", aWithDefault.get()); }
C getCommand(HystrixCommandKey key, ExecutionIsolationStrategy isolationStrategy, ExecutionResult executionResult, int executionLatency, FallbackResult fallbackResult, int fallbackLatency, HystrixCircuitBreakerTest.TestCircuitBreaker circuitBreaker, HystrixThreadPool threadPool, int timeout, CacheEnabled cacheEnabled, Object value, int executionSemaphoreCount, int fallbackSemaphoreCount) { AbstractCommand.TryableSemaphoreActual executionSemaphore = new AbstractCommand.TryableSemaphoreActual(HystrixProperty.Factory.asProperty(executionSemaphoreCount)); AbstractCommand.TryableSemaphoreActual fallbackSemaphore = new AbstractCommand.TryableSemaphoreActual(HystrixProperty.Factory.asProperty(fallbackSemaphoreCount)); return getCommand(key, isolationStrategy, executionResult, executionLatency, fallbackResult, fallbackLatency, circuitBreaker, threadPool, timeout, cacheEnabled, value, executionSemaphore, fallbackSemaphore, false); }
@Test public void testNested4() { HystrixProperty<String> nullValue = Factory.nullProperty(); HystrixProperty<String> a = Factory.asProperty(nullValue, null); HystrixProperty<String> withDefault = Factory.asProperty(a, "b"); assertEquals("b", withDefault.get()); }