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


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaCache.java:
##########
@@ -253,6 +253,9 @@ 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,
+          // and the first request will not hit cache
+          assertEquals(6 * i + 5, metrics.getMetaCacheHits());

Review Comment:
   Could we please do a metrics.getMetaCacheHits() for initial value before 
asserting (possibly current change may fail due to test case run order)? 
   Also, we can mention for 0th iteration there will be 5 hits + 1 cache miss 
in comments. 
   Could possibly add an assertion for cache miss as well.



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