vli02 commented on code in PR #5081:
URL: https://github.com/apache/hbase/pull/5081#discussion_r1130076127
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaCache.java:
##########
@@ -459,6 +460,20 @@ 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();
+ assertTrue(queueCount == 2);
+
+ long timeoutCount = metrics.getUserRegionLockTimeout().getCount();
+ assertTrue(timeoutCount == 1);
+
+ long waitingTimerCount =
metrics.getUserRegionLockWaitingTimer().getCount();
+ assertTrue(waitingTimerCount == 1);
+
+ long heldTimerCount = metrics.getUserRegionLockHeldTimer().getCount();
Review Comment:
As David mentioned in the first comment and the code in above line 437, the
time should always longer than 2 seconds here.
--
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]