Procházet zdrojové kódy

Fix TestHDFSFileContextMainOperations.

Change-Id: If657c2fd2b73f7479f87d786e00b1aab20fe8d33
Siyao Meng před 3 roky
rodič
revize
2c41ebb2cd

+ 10 - 11
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java

@@ -18,15 +18,6 @@
 
 package org.apache.hadoop.fs;
 
-import static org.apache.hadoop.fs.FileContextTestHelper.exists;
-import static org.junit.jupiter.api.Assertions.fail;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.security.auth.login.LoginException;
-
 import org.apache.hadoop.fs.Options.Rename;
 import org.apache.hadoop.hdfs.AppendTestUtil;
 import org.apache.hadoop.hdfs.DistributedFileSystem;
@@ -44,6 +35,14 @@ import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
 
+import javax.security.auth.login.LoginException;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import static org.apache.hadoop.fs.FileContextTestHelper.exists;
+import static org.junit.jupiter.api.Assertions.fail;
+
 public class TestHDFSFileContextMainOperations extends
     FileContextMainOperationsBaseTest {
   private static MiniDFSCluster cluster;
@@ -324,8 +323,8 @@ public class TestHDFSFileContextMainOperations extends
     };
 
     for (String invalidName: invalidNames) {
-        Assert.assertFalse(
-                fc.getDefaultFileSystem().isValidName(invalidName), invalidName + " is not valid");
+      Assert.assertFalse(invalidName + " is not valid",
+          fc.getDefaultFileSystem().isValidName(invalidName));
     }
   }