xkrogen commented on code in PR #4624:
URL: https://github.com/apache/hadoop/pull/4624#discussion_r934744686


##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeMetrics.java:
##########
@@ -591,14 +592,24 @@ public Boolean get() {
   }
 
   @Test
-  public void testNNRpcMetricsWithNonHA() throws IOException {
+  public void testNNRpcMetricsWithNonHA() throws Exception {
     Configuration conf = new HdfsConfiguration();
     // setting heartbeat interval to 1 hour to prevent bpServiceActor sends
     // heartbeat periodically to NN during running test case, and 
bpServiceActor
     // only sends heartbeat once after startup
     conf.setTimeDuration(DFS_HEARTBEAT_INTERVAL_KEY, 1, TimeUnit.HOURS);
     MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();
     cluster.waitActive();
+    final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();

Review Comment:
   Agreed that this isn't the right place. Actually it seems like enhancing 
`TestRPC#testRpcMetrics()` might be the best place? Or if we can't get it to 
work there, then I agree `TestNameNodeMetrics` seems better.



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