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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestLeaseRecovery.java:
##########


Review Comment:
   Please also migrate the assertions in `TestLeaseRecovery`.



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsHAURLs.java:
##########
@@ -299,14 +296,14 @@ public void testWithQualifiedDefaultFS() throws Exception 
{
           new GenericTestUtils.SystemErrCapturer()) {
         res = ToolRunner.run(shell, new String[] {"-ls", unqualifiedPath2});
         // Check stderr
-        Assert.assertThat("Command did not print the error message " +
+        MatcherAssert.assertThat("Command did not print the error message " +
                 "correctly for test case: "
                 + "ozone fs -ls o3fs://bucket.volume.id1:port/",
             capture.getOutput(), StringContains.containsString(
                 "does not use port information"));
       }
       // Check return value, should be -1 (failure)
-      Assert.assertEquals(res, -1);
+      assertEquals(-1, res);

Review Comment:
   Nice! (swapping arguments to reflect `expected, actual` order)



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFsHAURLs.java:
##########
@@ -41,36 +41,34 @@
 import org.apache.ozone.test.GenericTestUtils;
 import org.apache.hadoop.util.ToolRunner;
 import org.apache.ratis.util.LifeCycle;
+import org.hamcrest.MatcherAssert;
 import org.hamcrest.core.StringContains;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.util.Optional;
 import java.util.OptionalInt;
 import java.util.UUID;
 
-import org.junit.Rule;
-import org.junit.rules.TestRule;
-import org.junit.rules.Timeout;
-import org.apache.ozone.test.JUnit5AwareTimeout;
 import static org.apache.hadoop.hdds.HddsUtils.getHostName;
 import static org.apache.hadoop.hdds.HddsUtils.getHostPort;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
  * Test client-side URI handling with Ozone Manager HA.
  */
[email protected](300)

Review Comment:
   nit: `Timeout` can be imported.



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystemMissingParent.java:
##########


Review Comment:
   Please also migrate the assertions in `TestOzoneFileSystemMissingParent`.



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