From 99956e55620ab9deb4e34507149e69338db401bb Mon Sep 17 00:00:00 2001 From: jbreuer Date: Tue, 12 Feb 2019 11:27:26 -0800 Subject: [PATCH] Match the json stream output for the circuitBreakConfig isForcedClosed to the correct internal state. It had been erroneously matching isForcedClosed to the internal state of isForceOpen. --- .../contrib/sample/stream/HystrixConfigurationJsonStream.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hystrix-contrib/hystrix-metrics-event-stream/src/main/java/com/netflix/hystrix/contrib/sample/stream/HystrixConfigurationJsonStream.java b/hystrix-contrib/hystrix-metrics-event-stream/src/main/java/com/netflix/hystrix/contrib/sample/stream/HystrixConfigurationJsonStream.java index a6ee22d6d..2fa3d154b 100644 --- a/hystrix-contrib/hystrix-metrics-event-stream/src/main/java/com/netflix/hystrix/contrib/sample/stream/HystrixConfigurationJsonStream.java +++ b/hystrix-contrib/hystrix-metrics-event-stream/src/main/java/com/netflix/hystrix/contrib/sample/stream/HystrixConfigurationJsonStream.java @@ -105,7 +105,8 @@ private static void writeCommandConfigJson(JsonGenerator json, HystrixCommandKey HystrixCommandConfiguration.HystrixCommandCircuitBreakerConfig circuitBreakerConfig = commandConfig.getCircuitBreakerConfig(); json.writeBooleanField("enabled", circuitBreakerConfig.isEnabled()); json.writeBooleanField("isForcedOpen", circuitBreakerConfig.isForceOpen()); - json.writeBooleanField("isForcedClosed", circuitBreakerConfig.isForceOpen()); + json.writeBooleanField("isForcedClosed", circuitBreakerConfig. + isForceClosed()); json.writeNumberField("requestVolumeThreshold", circuitBreakerConfig.getRequestVolumeThreshold()); json.writeNumberField("errorPercentageThreshold", circuitBreakerConfig.getErrorThresholdPercentage()); json.writeNumberField("sleepInMilliseconds", circuitBreakerConfig.getSleepWindowInMilliseconds());