You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/01/08 07:34:23 UTC

[incubator-servicecomb-java-chassis] branch master updated (8acaf97 -> 485478e)

This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git.


    from 8acaf97  SCB-198 fileupload in linux is too slow, use system default setting is no problem.
     new 5a9acb9  [SCB-180] Hystrixcommand setter not set by dynamic configuration
     new fc0a370  [SCB-180] Hystrixcommand setter not set by dynamic configuration
     new 485478e  [SCB-180] Hystrixcommand setter not set by dynamic configuration

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../io/servicecomb/bizkeeper/BizkeeperHandler.java | 62 +---------------------
 .../bizkeeper/HystrixCommandPropertiesExt.java     | 45 ++++++++++++----
 .../bizkeeper/TestBizkeeperHandler.java            | 62 +++++++++++++++++++++-
 .../servicecomb/bizkeeper/TestConfiguration.java   |  7 +++
 .../TestHystrixPropertiesStrategyExt.java          | 10 ++--
 5 files changed, 109 insertions(+), 77 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@servicecomb.apache.org" <co...@servicecomb.apache.org>'].

[incubator-servicecomb-java-chassis] 01/03: [SCB-180] Hystrixcommand setter not set by dynamic configuration

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit 5a9acb959171ead2f3c171cb373564a18663f466
Author: donglzh168 <14...@qq.com>
AuthorDate: Fri Jan 5 17:40:19 2018 +0800

    [SCB-180] Hystrixcommand setter not set by dynamic configuration
---
 .../io/servicecomb/bizkeeper/BizkeeperHandler.java | 62 +---------------------
 .../bizkeeper/HystrixCommandPropertiesExt.java     | 45 ++++++++++++----
 2 files changed, 36 insertions(+), 71 deletions(-)

diff --git a/handlers/handler-bizkeeper/src/main/java/io/servicecomb/bizkeeper/BizkeeperHandler.java b/handlers/handler-bizkeeper/src/main/java/io/servicecomb/bizkeeper/BizkeeperHandler.java
index 5c3f166..9a2d5ca 100644
--- a/handlers/handler-bizkeeper/src/main/java/io/servicecomb/bizkeeper/BizkeeperHandler.java
+++ b/handlers/handler-bizkeeper/src/main/java/io/servicecomb/bizkeeper/BizkeeperHandler.java
@@ -21,7 +21,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.netflix.hystrix.HystrixCommandProperties;
-import com.netflix.hystrix.HystrixCommandProperties.ExecutionIsolationStrategy;
 import com.netflix.hystrix.HystrixInvokable;
 import com.netflix.hystrix.HystrixObservable;
 import com.netflix.hystrix.strategy.HystrixPlugins;
@@ -43,12 +42,6 @@ public abstract class BizkeeperHandler implements Handler {
 
   protected final String groupname;
 
-  private static final int WINDOW_IN_MILLISECONDS = 10000;
-
-  private static final int WINDOW_BUCKETS = 10;
-
-  private static final int SNAPSHOT_INTERVAL = 1000;
-
   static {
     try {
       HystrixPlugins.getInstance().registerPropertiesStrategy(HystrixPropertiesStrategyExt.getInstance());
@@ -57,6 +50,7 @@ public abstract class BizkeeperHandler implements Handler {
     }
     try {
       HystrixPlugins.getInstance().registerCommandExecutionHook(new HystrixCommandExecutionHook() {
+        @Override
         public <T> Exception onExecutionError(HystrixInvokable<T> commandInstance, Exception e) {
           LOG.warn("bizkeeper execution error", e);
           return e; //by default, just pass through
@@ -99,59 +93,5 @@ public abstract class BizkeeperHandler implements Handler {
   }
 
   protected void setCommonProperties(Invocation invocation, HystrixCommandProperties.Setter setter) {
-    setter.withExecutionTimeoutInMilliseconds(Configuration.INSTANCE
-        .getIsolationTimeoutInMilliseconds(groupname,
-            invocation.getMicroserviceName(),
-            invocation.getOperationMeta().getMicroserviceQualifiedName()))
-        .withExecutionIsolationSemaphoreMaxConcurrentRequests(Configuration.INSTANCE
-            .getIsolationMaxConcurrentRequests(groupname,
-                invocation.getMicroserviceName(),
-                invocation.getOperationMeta()
-                    .getMicroserviceQualifiedName()))
-        .withExecutionTimeoutEnabled(
-            Configuration.INSTANCE.getIsolationTimeoutEnabled(groupname,
-                invocation.getMicroserviceName(),
-                invocation.getOperationMeta()
-                    .getMicroserviceQualifiedName()))
-        .withCircuitBreakerEnabled(Configuration.INSTANCE.isCircuitBreakerEnabled(groupname,
-            invocation.getMicroserviceName(),
-            invocation.getOperationMeta()
-                .getMicroserviceQualifiedName()))
-        .withCircuitBreakerForceOpen(Configuration.INSTANCE.isCircuitBreakerForceOpen(groupname,
-            invocation.getMicroserviceName(),
-            invocation.getOperationMeta()
-                .getMicroserviceQualifiedName()))
-        .withCircuitBreakerForceClosed(Configuration.INSTANCE.isCircuitBreakerForceClosed(groupname,
-            invocation.getMicroserviceName(),
-            invocation.getOperationMeta()
-                .getMicroserviceQualifiedName()))
-        .withCircuitBreakerSleepWindowInMilliseconds(
-            Configuration.INSTANCE.getCircuitBreakerSleepWindowInMilliseconds(groupname,
-                invocation.getMicroserviceName(),
-                invocation.getOperationMeta()
-                    .getMicroserviceQualifiedName()))
-        .withCircuitBreakerRequestVolumeThreshold(
-            Configuration.INSTANCE.getCircuitBreakerRequestVolumeThreshold(groupname,
-                invocation.getMicroserviceName(),
-                invocation.getOperationMeta()
-                    .getMicroserviceQualifiedName()))
-        .withCircuitBreakerErrorThresholdPercentage(
-            Configuration.INSTANCE.getCircuitBreakerErrorThresholdPercentage(groupname,
-                invocation.getMicroserviceName(),
-                invocation.getOperationMeta()
-                    .getMicroserviceQualifiedName()))
-        .withFallbackEnabled(
-            Configuration.INSTANCE.isFallbackEnabled(groupname,
-                invocation.getMicroserviceName(),
-                invocation.getOperationMeta().getMicroserviceQualifiedName()))
-        .withExecutionIsolationStrategy(ExecutionIsolationStrategy.SEMAPHORE)
-        .withMetricsRollingPercentileEnabled(false)
-        .withMetricsRollingStatisticalWindowInMilliseconds(WINDOW_IN_MILLISECONDS)
-        .withMetricsRollingStatisticalWindowBuckets(WINDOW_BUCKETS)
-        .withMetricsHealthSnapshotIntervalInMilliseconds(SNAPSHOT_INTERVAL)
-        .withFallbackIsolationSemaphoreMaxConcurrentRequests(Configuration.INSTANCE
-            .getFallbackMaxConcurrentRequests(groupname,
-                invocation.getMicroserviceName(),
-                invocation.getOperationMeta().getMicroserviceQualifiedName()));
   }
 }
diff --git a/handlers/handler-bizkeeper/src/main/java/io/servicecomb/bizkeeper/HystrixCommandPropertiesExt.java b/handlers/handler-bizkeeper/src/main/java/io/servicecomb/bizkeeper/HystrixCommandPropertiesExt.java
index 0c4e36a..3a07c45 100644
--- a/handlers/handler-bizkeeper/src/main/java/io/servicecomb/bizkeeper/HystrixCommandPropertiesExt.java
+++ b/handlers/handler-bizkeeper/src/main/java/io/servicecomb/bizkeeper/HystrixCommandPropertiesExt.java
@@ -47,9 +47,9 @@ public class HystrixCommandPropertiesExt extends HystrixCommandProperties {
   // must occur before statistics matter
   private static final Integer DEFAULT_CIRCUITBREAKERREQUESTVOLUMETHRESHOLD = 20;
 
-  // default => sleepWindow: 5000 = 5 seconds that we will sleep before trying
+  // default => sleepWindow: 15000 = 15 seconds that we will sleep before trying
   // again after tripping the circuit
-  private static final Integer DEFAULT_CIRCUITBREAKERSLEEPWINDOWINMILLISECONDS = 5000;
+  private static final Integer DEFAULT_CIRCUITBREAKERSLEEPWINDOWINMILLISECONDS = 15000;
 
   // default => errorThresholdPercentage = 50 = if 50%+ of requests in 10
   // seconds are failures or latent then we will trip the circuit
@@ -62,16 +62,16 @@ public class HystrixCommandPropertiesExt extends HystrixCommandProperties {
   // default => ignoreErrors = false
   static final Boolean DEFAULT_CIRCUITBREAKERFORCECLOSED = false;
 
-  // default => executionTimeoutInMilliseconds: 1000 = 1 second
-  private static final Integer DEFAULT_EXECUTIONTIMEOUTINMILLISECONDS = 1000;
+  // default => executionTimeoutInMilliseconds: 30000 = 30 second
+  private static final Integer DEFAULT_EXECUTIONTIMEOUTINMILLISECONDS = 30000;
 
-  private static final Boolean DEFAULT_EXECUTIONTIMEOUTENABLED = true;
+  private static final Boolean DEFAULT_EXECUTIONTIMEOUTENABLED = false;
 
-  private static final ExecutionIsolationStrategy DEFAULT_ISOLATIONSTRATEGY = ExecutionIsolationStrategy.THREAD;
+  private static final ExecutionIsolationStrategy DEFAULT_ISOLATIONSTRATEGY = ExecutionIsolationStrategy.SEMAPHORE;
 
   private static final Boolean DEFAULT_EXECUTIONISOLATIONTHREADINTERRUPTONTIMEOUT = true;
 
-  private static final Boolean DEFAULT_METRICSROLLINGPERCENTILEENABLED = true;
+  private static final Boolean DEFAULT_METRICSROLLINGPERCENTILEENABLED = false;
 
   private static final Boolean DEFAULT_REQUESTCACHEENABLED = true;
 
@@ -79,7 +79,7 @@ public class HystrixCommandPropertiesExt extends HystrixCommandProperties {
 
   private static final Boolean DEFAULT_FALLBACKENABLED = true;
 
-  private static final Integer DEFAULT_EXECUTIONISOLATIONSEMAPHOREMAXCONCURRENTREQUESTS = 10;
+  private static final Integer DEFAULT_EXECUTIONISOLATIONSEMAPHOREMAXCONCURRENTREQUESTS = 1000;
 
   private static final Boolean DEFAULT_REQUESTLOGENABLED = true;
 
@@ -94,9 +94,9 @@ public class HystrixCommandPropertiesExt extends HystrixCommandProperties {
   // default to 100 values max per bucket
   private static final Integer DEFAULT_METRICSROLLINGPERCENTILEBUCKETSIZE = 100;
 
-  // default to 500ms as max frequency between allowing snapshots of health
+  // default to 1000ms as max frequency between allowing snapshots of health
   // (error percentage etc)
-  private static final Integer DEFAULT_METRICSHEALTHSNAPSHOTINTERVALINMILLISECONDS = 500;
+  private static final Integer DEFAULT_METRICSHEALTHSNAPSHOTINTERVALINMILLISECONDS = 1000;
 
   private static final int COMMAND_KEY_LENGTH = 3;
 
@@ -328,103 +328,128 @@ public class HystrixCommandPropertiesExt extends HystrixCommandProperties {
         .build();
   }
 
+  @Override
   public HystrixProperty<Boolean> circuitBreakerEnabled() {
     return circuitBreakerEnabled;
   }
 
+  @Override
   public HystrixProperty<Integer> circuitBreakerErrorThresholdPercentage() {
     return circuitBreakerErrorThresholdPercentage;
   }
 
+  @Override
   public HystrixProperty<Boolean> circuitBreakerForceClosed() {
     return circuitBreakerForceClosed;
   }
 
+  @Override
   public HystrixProperty<Boolean> circuitBreakerForceOpen() {
     return circuitBreakerForceOpen;
   }
 
+  @Override
   public HystrixProperty<Integer> circuitBreakerRequestVolumeThreshold() {
     return circuitBreakerRequestVolumeThreshold;
   }
 
+  @Override
   public HystrixProperty<Integer> circuitBreakerSleepWindowInMilliseconds() {
     return circuitBreakerSleepWindowInMilliseconds;
   }
 
+  @Override
   public HystrixProperty<Integer> executionIsolationSemaphoreMaxConcurrentRequests() {
     return executionIsolationSemaphoreMaxConcurrentRequests;
   }
 
+  @Override
   public HystrixProperty<ExecutionIsolationStrategy> executionIsolationStrategy() {
     return executionIsolationStrategy;
   }
 
+  @Override
   public HystrixProperty<Boolean> executionIsolationThreadInterruptOnTimeout() {
     return executionIsolationThreadInterruptOnTimeout;
   }
 
+  @Override
   public HystrixProperty<String> executionIsolationThreadPoolKeyOverride() {
     return executionIsolationThreadPoolKeyOverride;
   }
 
+  @Override
   @Deprecated // prefer {@link #executionTimeoutInMilliseconds}
   public HystrixProperty<Integer> executionIsolationThreadTimeoutInMilliseconds() {
     return executionTimeoutInMilliseconds;
   }
 
+  @Override
   public HystrixProperty<Integer> executionTimeoutInMilliseconds() {
     return executionIsolationThreadTimeoutInMilliseconds();
   }
 
+  @Override
   public HystrixProperty<Boolean> executionTimeoutEnabled() {
     return executionTimeoutEnabled;
   }
 
+  @Override
   public HystrixProperty<Integer> fallbackIsolationSemaphoreMaxConcurrentRequests() {
     return fallbackIsolationSemaphoreMaxConcurrentRequests;
   }
 
+  @Override
   public HystrixProperty<Boolean> fallbackEnabled() {
     return fallbackEnabled;
   }
 
+  @Override
   public HystrixProperty<Integer> metricsHealthSnapshotIntervalInMilliseconds() {
     return metricsHealthSnapshotIntervalInMilliseconds;
   }
 
+  @Override
   public HystrixProperty<Integer> metricsRollingPercentileBucketSize() {
     return metricsRollingPercentileBucketSize;
   }
 
+  @Override
   public HystrixProperty<Boolean> metricsRollingPercentileEnabled() {
     return metricsRollingPercentileEnabled;
   }
 
+  @Override
   public HystrixProperty<Integer> metricsRollingPercentileWindow() {
     return metricsRollingPercentileWindowInMilliseconds;
   }
 
+  @Override
   public HystrixProperty<Integer> metricsRollingPercentileWindowInMilliseconds() {
     return metricsRollingPercentileWindowInMilliseconds;
   }
 
+  @Override
   public HystrixProperty<Integer> metricsRollingPercentileWindowBuckets() {
     return metricsRollingPercentileWindowBuckets;
   }
 
+  @Override
   public HystrixProperty<Integer> metricsRollingStatisticalWindowInMilliseconds() {
     return metricsRollingStatisticalWindowInMilliseconds;
   }
 
+  @Override
   public HystrixProperty<Integer> metricsRollingStatisticalWindowBuckets() {
     return metricsRollingStatisticalWindowBuckets;
   }
 
+  @Override
   public HystrixProperty<Boolean> requestCacheEnabled() {
     return requestCacheEnabled;
   }
 
+  @Override
   public HystrixProperty<Boolean> requestLogEnabled() {
     return requestLogEnabled;
   }

-- 
To stop receiving notification emails like this one, please contact
"commits@servicecomb.apache.org" <co...@servicecomb.apache.org>.

[incubator-servicecomb-java-chassis] 02/03: [SCB-180] Hystrixcommand setter not set by dynamic configuration

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit fc0a37069756ada579e0f7b4b81f0145c3d6d480
Author: donglzh168 <14...@qq.com>
AuthorDate: Sat Jan 6 14:28:20 2018 +0800

    [SCB-180] Hystrixcommand setter not set by dynamic configuration
---
 .../test/java/io/servicecomb/bizkeeper/TestBizkeeperHandler.java  | 4 ++--
 .../servicecomb/bizkeeper/TestHystrixPropertiesStrategyExt.java   | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestBizkeeperHandler.java b/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestBizkeeperHandler.java
index a8b646d..bf1c1ea 100644
--- a/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestBizkeeperHandler.java
+++ b/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestBizkeeperHandler.java
@@ -105,7 +105,7 @@ public class TestBizkeeperHandler extends BizkeeperHandler {
     } catch (Exception e) {
       validAssert = false;
     }
-    Assert.assertFalse(validAssert);
+    Assert.assertTrue(validAssert);
   }
 
   @Override
@@ -145,7 +145,7 @@ public class TestBizkeeperHandler extends BizkeeperHandler {
     System.setProperty("cse.fallbackpolicy.Group_Name.testHandleForceReturnnull.policy", "returnnull");
     bizkeeperHandler.handle(invocation, f -> {
       Assert.assertTrue(f.isSuccessed());
-      Assert.assertEquals(null, (Object) f.getResult());
+      Assert.assertEquals(null, f.getResult());
     });
   }
 }
diff --git a/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestHystrixPropertiesStrategyExt.java b/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestHystrixPropertiesStrategyExt.java
index d127906..b0cd624 100644
--- a/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestHystrixPropertiesStrategyExt.java
+++ b/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestHystrixPropertiesStrategyExt.java
@@ -70,12 +70,12 @@ public class TestHystrixPropertiesStrategyExt {
     Assert.assertFalse(commandPro.circuitBreakerForceClosed().get());
     Assert.assertFalse(commandPro.circuitBreakerForceOpen().get());
     Assert.assertEquals(Integer.valueOf(20), commandPro.circuitBreakerRequestVolumeThreshold().get());
-    Assert.assertEquals(Integer.valueOf(5000), commandPro.circuitBreakerSleepWindowInMilliseconds().get());
-    Assert.assertEquals(Integer.valueOf(10), commandPro.executionIsolationSemaphoreMaxConcurrentRequests().get());
+    Assert.assertEquals(Integer.valueOf(15000), commandPro.circuitBreakerSleepWindowInMilliseconds().get());
+    Assert.assertEquals(Integer.valueOf(1000), commandPro.executionIsolationSemaphoreMaxConcurrentRequests().get());
     Assert.assertTrue(commandPro.executionIsolationThreadInterruptOnTimeout().get());
     Assert.assertEquals(null, commandPro.executionIsolationThreadPoolKeyOverride().get());
-    Assert.assertEquals(Integer.valueOf(1000), commandPro.executionTimeoutInMilliseconds().get());
-    Assert.assertTrue(commandPro.executionTimeoutEnabled().get());
+    Assert.assertEquals(Integer.valueOf(30000), commandPro.executionTimeoutInMilliseconds().get());
+    Assert.assertFalse(commandPro.executionTimeoutEnabled().get());
     Assert.assertEquals(Integer.valueOf(10), commandPro.fallbackIsolationSemaphoreMaxConcurrentRequests().get());
     Assert.assertTrue(commandPro.fallbackEnabled().get());
   }

-- 
To stop receiving notification emails like this one, please contact
"commits@servicecomb.apache.org" <co...@servicecomb.apache.org>.

[incubator-servicecomb-java-chassis] 03/03: [SCB-180] Hystrixcommand setter not set by dynamic configuration

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit 485478edf7a24dc420cee2f95134aefb4aa70420
Author: donglzh168 <14...@qq.com>
AuthorDate: Sat Jan 6 17:14:29 2018 +0800

    [SCB-180] Hystrixcommand setter not set by dynamic configuration
---
 .../bizkeeper/TestBizkeeperHandler.java            | 60 +++++++++++++++++++++-
 .../servicecomb/bizkeeper/TestConfiguration.java   |  7 +++
 .../TestHystrixPropertiesStrategyExt.java          |  2 +
 3 files changed, 68 insertions(+), 1 deletion(-)

diff --git a/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestBizkeeperHandler.java b/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestBizkeeperHandler.java
index bf1c1ea..7b7a39a 100644
--- a/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestBizkeeperHandler.java
+++ b/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestBizkeeperHandler.java
@@ -22,6 +22,8 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
 
 import com.netflix.hystrix.HystrixCommandProperties;
 import com.netflix.hystrix.HystrixObservableCommand;
@@ -30,6 +32,7 @@ import com.netflix.hystrix.strategy.HystrixPlugins;
 import io.servicecomb.core.Invocation;
 import io.servicecomb.core.definition.OperationMeta;
 import io.servicecomb.swagger.invocation.AsyncResponse;
+import io.servicecomb.swagger.invocation.InvocationType;
 
 public class TestBizkeeperHandler extends BizkeeperHandler {
 
@@ -145,7 +148,62 @@ public class TestBizkeeperHandler extends BizkeeperHandler {
     System.setProperty("cse.fallbackpolicy.Group_Name.testHandleForceReturnnull.policy", "returnnull");
     bizkeeperHandler.handle(invocation, f -> {
       Assert.assertTrue(f.isSuccessed());
-      Assert.assertEquals(null, f.getResult());
+      Assert.assertNull(f.getResult());
+    });
+  }
+
+  @Test
+  public void testHandleInError() throws Exception {
+    Mockito.when(invocation.getMicroserviceName()).thenReturn("testHandleInError");
+    Mockito.when(invocation.getOperationMeta()).thenReturn(Mockito.mock(OperationMeta.class));
+    Mockito.when(invocation.getOperationMeta().getMicroserviceQualifiedName())
+        .thenReturn("testHandleInError");
+    FallbackPolicy policy = Mockito.mock(FallbackPolicy.class);
+    Mockito.when(policy.name()).thenReturn("throwException");
+    Mockito.when(policy.getFallbackResponse(Mockito.any(Invocation.class))).thenThrow(new RuntimeException());
+    FallbackPolicyManager.addPolicy(policy);
+    System.setProperty("cse.fallbackpolicy.groupname.testHandleInError.policy", "throwException");
+    Mockito.doAnswer(new Answer<Void>() {
+      @Override
+      public Void answer(InvocationOnMock invocation) {
+        AsyncResponse asyncRsp = invocation.getArgumentAt(0, AsyncResponse.class);
+        asyncRsp.fail(InvocationType.CONSUMER, new Exception("testHandleInError"));
+        return null;
+      }
+    }).when(invocation).next(Mockito.any(AsyncResponse.class));;
+    bizkeeperHandler.handle(invocation, f -> {
+      Assert.assertTrue(f.isFailed());
+    });
+  }
+
+  @Test
+  public void testHandlNextException() throws Exception {
+    Mockito.when(invocation.getMicroserviceName()).thenReturn("testHandlNextException");
+    Mockito.when(invocation.getOperationMeta()).thenReturn(Mockito.mock(OperationMeta.class));
+    Mockito.when(invocation.getOperationMeta().getMicroserviceQualifiedName())
+        .thenReturn("testHandlNextException");
+    Mockito.doThrow(new Exception("testHandlNextException")).when(invocation).next(Mockito.any(AsyncResponse.class));
+    bizkeeperHandler.handle(invocation, f -> {
+      Assert.assertTrue(f.isFailed());
+    });
+  }
+
+  @Test
+  public void testHandleSuccess() throws Exception {
+    Mockito.when(invocation.getMicroserviceName()).thenReturn("testHandleSuccess");
+    Mockito.when(invocation.getOperationMeta()).thenReturn(Mockito.mock(OperationMeta.class));
+    Mockito.when(invocation.getOperationMeta().getMicroserviceQualifiedName())
+        .thenReturn("testHandleSuccess");
+    Mockito.doAnswer(new Answer<Void>() {
+      @Override
+      public Void answer(InvocationOnMock invocation) {
+        AsyncResponse asyncRsp = invocation.getArgumentAt(0, AsyncResponse.class);
+        asyncRsp.success("");
+        return null;
+      }
+    }).when(invocation).next(Mockito.any(AsyncResponse.class));;
+    bizkeeperHandler.handle(invocation, f -> {
+      Assert.assertTrue(f.isSuccessed());
     });
   }
 }
diff --git a/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestConfiguration.java b/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestConfiguration.java
index e450614..aba9084 100644
--- a/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestConfiguration.java
+++ b/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestConfiguration.java
@@ -54,5 +54,12 @@ public class TestConfiguration {
     String str = c.getFallbackPolicyPolicy("groupname", test2, "testqualify");
     // no need to give default value now
     assertEquals(null, str);
+
+    assertFalse(c.isCircuitBreakerForceOpen("groupname", test2, "testqualify"));
+    assertFalse(c.isCircuitBreakerForceClosed("groupname", test2, "testqualify"));
+    assertEquals(15000, c.getCircuitBreakerSleepWindowInMilliseconds("groupname", test2, "testqualify"));
+    assertEquals(20, c.getCircuitBreakerRequestVolumeThreshold("groupname", test2, "testqualify"));
+    assertEquals(50, c.getCircuitBreakerErrorThresholdPercentage("groupname", test2, "testqualify"));
+    assertTrue(c.isFallbackEnabled("groupname", test2, "testqualify"));
   }
 }
diff --git a/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestHystrixPropertiesStrategyExt.java b/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestHystrixPropertiesStrategyExt.java
index b0cd624..1244ac1 100644
--- a/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestHystrixPropertiesStrategyExt.java
+++ b/handlers/handler-bizkeeper/src/test/java/io/servicecomb/bizkeeper/TestHystrixPropertiesStrategyExt.java
@@ -78,5 +78,7 @@ public class TestHystrixPropertiesStrategyExt {
     Assert.assertFalse(commandPro.executionTimeoutEnabled().get());
     Assert.assertEquals(Integer.valueOf(10), commandPro.fallbackIsolationSemaphoreMaxConcurrentRequests().get());
     Assert.assertTrue(commandPro.fallbackEnabled().get());
+    Assert.assertEquals(Integer.valueOf(100), commandPro.metricsRollingPercentileBucketSize().get());
+    Assert.assertFalse(commandPro.metricsRollingPercentileEnabled().get());
   }
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@servicecomb.apache.org" <co...@servicecomb.apache.org>.