adoroszlai commented on code in PR #4373:
URL: https://github.com/apache/ozone/pull/4373#discussion_r1138285996


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystemMetrics.java:
##########
@@ -81,9 +84,10 @@ public static void init() throws Exception {
         .setStreamBufferMaxSize(4) // MB
         .build();
     cluster.waitForClusterToBeReady();
+    client = cluster.getClient();
 
     // create a volume and a bucket to be used by OzoneFileSystem
-    bucket = TestDataUtil.createVolumeAndBucket(cluster);
+    bucket = TestDataUtil.createVolumeAndBucket(client);

Review Comment:
   I just remembered another reason for doing it this way: the method returns 
`OzoneBucket`, which some tests ignore, but some tests keep using it.  
`OzoneBucket` internally stores the client.  If we close the client in 
`createVolumeAndBucket`, the object will be useless.



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