jianghuazhu commented on a change in pull request #3822:
URL: https://github.com/apache/hadoop/pull/3822#discussion_r773787731



##########
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java
##########
@@ -1107,6 +1108,45 @@ public TestRpcService run() {
     }
   }
 
+  @Test
+  public void testNumInProcessHandlerMetrics() throws Exception {
+    UserGroupInformation ugi = UserGroupInformation.
+      createUserForTesting("user123", new String[0]);
+    // use 1 handler so the callq can be plugged
+    final Server server = setupTestServer(conf, 1);
+    try {
+      RpcMetrics rpcMetrics = server.getRpcMetrics();
+      assertEquals(rpcMetrics.getNumInProcessHandler(), 0);
+
+      ExternalCall<String> call1 = newExtCall(ugi,
+          new PrivilegedExceptionAction<String>() {
+        @Override
+        public String run() throws Exception {
+          assertTrue(rpcMetrics.getNumInProcessHandler() > 0);

Review comment:
       Thank you @virajjasani for your comments and reviews.
   I will update it later.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to