zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] eolivelli commented on a change in pull request #840: ZOOKEEPER-3143 Pluggable metrics system for ZooKeeper - Data Collection on Server
Date Sun, 10 Mar 2019 10:22:35 GMT
eolivelli commented on a change in pull request #840:  ZOOKEEPER-3143 Pluggable metrics system
for ZooKeeper - Data Collection on Server
URL: https://github.com/apache/zookeeper/pull/840#discussion_r264032223
 
 

 ##########
 File path: zookeeper-server/src/test/java/org/apache/zookeeper/server/watch/WatcherCleanerTest.java
 ##########
 @@ -134,8 +136,10 @@ public void testMaxInProcessingDeadWatchers() {
 
     @Test
     public void testDeadWatcherMetrics() {
+        ServerMetrics serverMetrics = new ServerMetrics(new DefaultMetricsProvider());
 
 Review comment:
   If you create an instance you are sure that is it not shared with other tests, the initial
state is known.
   I should call 'resetAll'
   But expecially in this kind of the tests I see it better to have an explicit management.
   
   Having static variables implicitly introduce side effects in tests and unpredictable behaviour

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message