steveloughran commented on code in PR #6080:
URL: https://github.com/apache/hadoop/pull/6080#discussion_r1327337337


##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileSystemInitialization.java:
##########
@@ -77,6 +77,22 @@ public void testNewInstanceFailure() throws Throwable {
         .isEqualTo(1);
   }
 
+  @Test
+  public void testInvalidLocalFileSystem() throws Exception {
+    Configuration conf = new Configuration();
+    conf.set("fs.file.impl", "org.apache.hadoop.fs.RawLocalFileSystem");

Review Comment:
   needs to disable caching for that fs or this can pick up existing one from 
cache



##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileSystemInitialization.java:
##########
@@ -77,6 +77,22 @@ public void testNewInstanceFailure() throws Throwable {
         .isEqualTo(1);
   }
 
+  @Test
+  public void testInvalidLocalFileSystem() throws Exception {
+    Configuration conf = new Configuration();
+    conf.set("fs.file.impl", "org.apache.hadoop.fs.RawLocalFileSystem");
+    try {

Review Comment:
   use LambdaTestUtils.intercept(); return the actual FileSystem.toString() in 
the error, e.g
   ```java
   intercept(IllegalArgument.class, "should extend", () -> 
     "got filesystem " + FileSystem.getLocal(conf));
   ```
   



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