anujmodi2021 commented on code in PR #7652:
URL: https://github.com/apache/hadoop/pull/7652#discussion_r2073308197


##########
hadoop-tools/hadoop-azure-datalake/src/test/java/org/apache/hadoop/fs/adl/live/TestAdlSupportedCharsetInPath.java:
##########
@@ -286,49 +284,45 @@ private boolean contains(FileStatus[] statuses, String 
remotePath) {
     return false;
   }
 
-  @Before
+  @BeforeEach
   public void setup() throws Exception {
-    org.junit.Assume
-        .assumeTrue(AdlStorageConfiguration.isContractTestEnabled());
+    assumeTrue(AdlStorageConfiguration.isContractTestEnabled());
   }
 
-  @Test
-  public void testAllowedSpecialCharactersRename()
+  @MethodSource("adlCharTestData")
+  @ParameterizedTest(name = "filePath {0}")
+  public void testAllowedSpecialCharactersRename(String filePath)
       throws IOException, URISyntaxException {
-
+    initTestAdlSupportedCharsetInPath(filePath);
     String parentPath = TEST_ROOT + UUID.randomUUID().toString() + "/";
     Path specialFile = new Path(parentPath + path);
     Path anotherLocation = new Path(parentPath + UUID.randomUUID().toString());
     FileSystem fs = AdlStorageConfiguration.createStorageConnector();
 
-    Assert.assertTrue("Could not create " + specialFile.toString(),
-        fs.createNewFile(specialFile));
-    Assert.assertTrue(
-        "Failed to rename " + specialFile.toString() + " --> " + 
anotherLocation
-            .toString(), fs.rename(specialFile, anotherLocation));
-    Assert.assertFalse("File should not be present after successful rename : "
-        + specialFile.toString(), fs.exists(specialFile));
-    Assert.assertTrue("File should be present after successful rename : "
-        + anotherLocation.toString(), fs.exists(anotherLocation));
-    Assert.assertFalse(
-        "Listed under parent whereas expected not listed : " + parentPath,
-        contains(fs.listStatus(new Path(parentPath)),
-            fs.makeQualified(specialFile).toString()));
+    assertTrue(fs.createNewFile(specialFile),
+        "Could not create " + specialFile.toString());
+    assertTrue(fs.rename(specialFile, anotherLocation),
+        "Failed to rename " + specialFile.toString() + " --> " + 
anotherLocation.toString());
+    assertFalse(fs.exists(specialFile), "File should not be present after 
successful rename : "
+        + specialFile.toString());
+    assertTrue(fs.exists(anotherLocation), "File should be present after 
successful rename : "
+        + anotherLocation.toString());
+    assertFalse(contains(fs.listStatus(new Path(parentPath)),
+        fs.makeQualified(specialFile).toString()),
+        "Listed under parent whereas expected not listed : " + parentPath);
 
-    Assert.assertTrue(
+    assertTrue(fs.rename(anotherLocation, specialFile),
         "Failed to rename " + anotherLocation.toString() + " --> " + 
specialFile
-            .toString(), fs.rename(anotherLocation, specialFile));
-    Assert.assertTrue(
-        "File should be present after successful rename : " + "" + specialFile
-            .toString(), fs.exists(specialFile));
-    Assert.assertFalse("File should not be present after successful rename : "
-        + anotherLocation.toString(), fs.exists(anotherLocation));
+        .toString());
+    assertTrue(fs.exists(specialFile),
+        "File should be present after successful rename : " + "" + 
specialFile.toString());
+    assertFalse(fs.exists(anotherLocation),
+        "File should not be present after successful rename : "
+        + anotherLocation.toString());
 
-    Assert.assertTrue("Not listed under parent " + parentPath,
-        contains(fs.listStatus(new Path(parentPath)),
-            fs.makeQualified(specialFile).toString()));
+    assertTrue(contains(fs.listStatus(new Path(parentPath)),
+        fs.makeQualified(specialFile).toString()), "Not listed under parent " 
+ parentPath);
 
-    Assert.assertTrue("Failed to delete " + parentPath,
-        fs.delete(new Path(parentPath), true));
+    assertTrue(fs.delete(new Path(parentPath), true), "Failed to delete " + 
parentPath);
   }
 }

Review Comment:
   nit: EOF



##########
hadoop-tools/hadoop-azure-datalake/src/test/java/org/apache/hadoop/fs/adl/live/TestAdlInternalCreateNonRecursive.java:
##########
@@ -23,25 +23,23 @@
 import org.apache.hadoop.fs.FileAlreadyExistsException;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.fs.adl.common.Parallelized;
 import org.apache.hadoop.fs.permission.FsPermission;
-import org.junit.Assert;
-import org.junit.Assume;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
 
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.UUID;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.fail;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
+
 /**
  * Test createNonRecursive API.
  */
-@RunWith(Parallelized.class)

Review Comment:
   Is this removed intentionally?



-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to