d-c-manning commented on code in PR #5081:
URL: https://github.com/apache/hbase/pull/5081#discussion_r1129987139
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaCache.java:
##########
@@ -459,6 +460,28 @@ public void testUserRegionLockThrowsException() throws
IOException, InterruptedE
assertTrue(client1.getException() instanceof LockTimeoutException
^ client2.getException() instanceof LockTimeoutException);
+
+ // obtain the client metrics
+ MetricsConnection metrics = conn.getConnectionMetrics();
+ long queueCount = metrics.getUserRegionLockQueue().getCount();
+ assertEquals("Queue of userRegionLock should be updated twice.
queueCount: " + queueCount,
Review Comment:
You don't have to add the variables to the strings in all the `assertEquals`
calls because the assert message will gives the expected and actual values for
`assertEquals`. It was only in `assertTrue` that I thought it would be useful
to have the actual value included there, since the assert message will only say
"expected true, actual false". Of course it probably doesn't hurt anything to
have these here, it's only extra code.
--
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]