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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/OzoneRpcClientTests.java:
##########
@@ -4810,17 +4812,15 @@ void testMultiPartUploadWithStream(ReplicationConfig 
replicationConfig)
   }
 
   @Test
-  public void testUploadWithStreamAndMemoryMappedBuffer() throws IOException {
+  public void testUploadWithStreamAndMemoryMappedBuffer(@TempDir Path dir) 
throws IOException {
     // create a local dir
-    final String dir = GenericTestUtils.getTempPath(
-        getClass().getSimpleName());
-    GenericTestUtils.assertDirCreation(new File(dir));
+    GenericTestUtils.assertDirCreation(new File(dir.toString()));

Review Comment:
   nit: `dir` is created by JUnit, isn't it?



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/metrics/TestContainerMetrics.java:
##########
@@ -185,7 +174,7 @@ static void runTestClientServer(
       initConf.accept(pipeline);
 
       DatanodeDetails dn = pipeline.getFirstNode();
-      volumeSet = createVolumeSet(dn, TEST_DIR + dn.getUuidString());
+      volumeSet = createVolumeSet(dn, testDir + dn.getUuidString());

Review Comment:
   Can you please confirm if `testDir` has `/` at the end?  If it doesn't, this 
will create a different directory that JUnit does not know about.



##########
hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/GenericTestUtils.java:
##########
@@ -90,10 +90,13 @@ public static Instant getTestStartTime() {
   }
 
   /**
+   * @deprecated use {@link org.junit.jupiter.api.io.TempDir} instead.
+   *
    * Get the (created) base directory for tests.
    *
    * @return the absolute directory
    */

Review Comment:
   Shouldn't `@deprecated` javadoc tag be grouped with the other tags, at the 
end?
   
   
https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html#orderoftags



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