[ 
https://issues.apache.org/jira/browse/SCB-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469921#comment-16469921
 ] 

ASF GitHub Bot commented on SCB-506:
------------------------------------

wujimin commented on a change in pull request #678: [SCB-506]服务治理相关的需要事件上报
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/678#discussion_r187239668
 
 

 ##########
 File path: 
handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/filter/TestIsolationServerListFilter.java
 ##########
 @@ -60,29 +63,26 @@ public static void classTeardown() {
     Deencapsulation.setField(ConfigurationManager.class, "instance", null);
     Deencapsulation.setField(ConfigurationManager.class, 
"customConfigurationInstalled", false);
     Deencapsulation.setField(DynamicPropertyFactory.class, "config", null);
+    ArchaiusUtils.resetConfig();
   }
 
   @Before
   public void setUp() throws Exception {
     IsolationServerListFilter = new IsolationServerListFilter();
     loadBalancerStats = new LoadBalancerStats("loadBalancer");
-
-    AbstractConfiguration configuration =
-        (AbstractConfiguration) 
DynamicPropertyFactory.getBackingConfigurationSource();
-    configuration.clearProperty("cse.loadbalance.isolation.enabled");
-    configuration.addProperty("cse.loadbalance.isolation.enabled",
+    ArchaiusUtils.setProperty("cse.loadbalance.isolation.enabled",
         "true");
-    
configuration.clearProperty("cse.loadbalance.isolation.enableRequestThreshold");
-    
configuration.addProperty("cse.loadbalance.isolation.enableRequestThreshold",
+    
ArchaiusUtils.setProperty("cse.loadbalance.isolation.enableRequestThreshold",
         "3");
 
     taskList = new ArrayList<>();
-    EventManager.register(new Object() {
+    receiveEvent = new Object() {
       @Subscribe
       public void onEvent(AlarmEvent isolationServerEvent) {
         taskList.add(isolationServerEvent);
       }
-    });
+    };
+    EventManager.register(receiveEvent);
 
 Review comment:
   EventManager is global instance
   where is the clear action?
   
   and it's better not do this
   also had wrote this days ago

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 服务治理相关的需要事件上报
> -------------
>
>                 Key: SCB-506
>                 URL: https://issues.apache.org/jira/browse/SCB-506
>             Project: Apache ServiceComb
>          Issue Type: Task
>          Components: Java-Chassis
>            Reporter: xuyiyun
>            Assignee: xuyiyun
>            Priority: Major
>             Fix For: java-chassis-1.0.0-m2
>
>
> 如果发生服务降级 实例隔离 熔断等操作,业务监控系统需要能获取到对应的通知,方便集成



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to