jiajunwang commented on a change in pull request #686: Add resource partition 
weight gauge
URL: https://github.com/apache/helix/pull/686#discussion_r369312412
 
 

 ##########
 File path: 
helix-core/src/test/java/org/apache/helix/monitoring/mbeans/TestResourceMonitor.java
 ##########
 @@ -217,10 +217,13 @@ public void testReportData() throws JMException {
     
monitor.setRebalanceState(ResourceMonitor.RebalanceStatus.INTERMEDIATE_STATE_CAL_FAILED);
     Assert.assertEquals(monitor.getRebalanceState(),
         ResourceMonitor.RebalanceStatus.INTERMEDIATE_STATE_CAL_FAILED.name());
+
+    // Has to unregister this monitor to clean up. Otherwise, later tests may 
be affected and fail.
+    monitor.unregister();
 
 Review comment:
   In this case, put it in finally block and check if monitor is null before 
unregister.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to