asafm commented on code in PR #17041:
URL: https://github.com/apache/pulsar/pull/17041#discussion_r959335404


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java:
##########
@@ -1522,6 +1524,81 @@ public void testSplitTopicAndPartitionLabel() throws 
Exception {
         consumer2.close();
     }
 
+
+    @Test
+    public void testMetadataStoreStats() throws Exception {

Review Comment:
   I wouldn't add tests to this file. It's an all-include bucket files which 
can easily wind up 10k lines.
   I recommend moving those tests to `MetadataStoreStatsTest`



##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/AbstractMetadataStore.java:
##########
@@ -126,6 +128,8 @@ public CompletableFuture<Boolean> asyncReload(String key, 
Boolean oldValue,
                         }
                     }
                 });
+
+        this.stats = MetadataStoreStats.create();

Review Comment:
   Same as `Assert`, `this.` doesn't add any meaning here, so it gets in the 
way of reading the code.
   
   @codelipenghui What's the process for changing the `checkstyle` plugin to 
add it?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to