NihalJain commented on code in PR #5253:
URL: https://github.com/apache/hbase/pull/5253#discussion_r1206903539


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaCache.java:
##########
@@ -253,6 +254,11 @@ public void testPreserveMetaCacheOnException() throws 
Exception {
           table.increment(increment);
           table.delete(delete);
           table.mutateRow(mutations);
+          // The value of the metaCacheHits counter is incremented by 6 in 
each round of the loop,
+          // for 0th iteration there will be 5 hits + 1 cache miss.
+          assertEquals(initialMetaCacheHits + 6 * i + 5, 
metrics.getMetaCacheHits());
+          // We will get a cache miss only on the first request, so the value 
will always be 1.
+          assertEquals(1, metrics.getMetaCacheMisses());

Review Comment:
   Init `getMetaCacheMisses` too before asserting similar to 
`initialMetaCacheHits`? Thanks for the quick review addressal :)



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