This is an automated email from the ASF dual-hosted git repository.

aokolnychyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new 3ac871a9e3 ORC: Fix to avoid test failure on Hadoop 2.7.3 (#7894)
3ac871a9e3 is described below

commit 3ac871a9e3cfc263d83d3c0d17c73b2bfaee3ef8
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Fri Jun 23 15:26:32 2023 -0700

    ORC: Fix to avoid test failure on Hadoop 2.7.3 (#7894)
---
 orc/src/test/java/org/apache/iceberg/orc/TestOrcDataWriter.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/orc/src/test/java/org/apache/iceberg/orc/TestOrcDataWriter.java 
b/orc/src/test/java/org/apache/iceberg/orc/TestOrcDataWriter.java
index 58b48f25b5..f1db007ef8 100644
--- a/orc/src/test/java/org/apache/iceberg/orc/TestOrcDataWriter.java
+++ b/orc/src/test/java/org/apache/iceberg/orc/TestOrcDataWriter.java
@@ -23,7 +23,6 @@ import java.util.List;
 import java.util.stream.Collectors;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.fs.UnsupportedFileSystemException;
 import org.apache.iceberg.DataFile;
 import org.apache.iceberg.FileContent;
 import org.apache.iceberg.FileFormat;
@@ -140,12 +139,13 @@ public class TestOrcDataWriter {
     // When files other than HadoopInputFile and HadoopOutputFile are supplied 
the location
     // is used to determine the corresponding FileSystem class based on the 
scheme in case of
     // local files that would be the LocalFileSystem. To prevent this we use 
the Proxy classes to
-    // use a scheme `dummy` that is not handled.
+    // use a scheme `dummy` that is not handled. Note that Hadoop 2.7.3 throws 
IOException
+    // while latest Hadoop versions throw UnsupportedFileSystemException 
(extends IOException)
     ProxyOutputFile outFile = new 
ProxyOutputFile(Files.localOutput(temp.newFile()));
     Assertions.assertThatThrownBy(
             () -> new Path(outFile.location()).getFileSystem(new 
Configuration()))
-        .isInstanceOf(UnsupportedFileSystemException.class)
-        .hasMessageStartingWith("No FileSystem for scheme \"dummy\"");
+        .isInstanceOf(IOException.class)
+        .hasMessageStartingWith("No FileSystem for scheme");
 
     // Given that FileIO is now handled there is no determination of 
FileSystem based on scheme
     // but instead operations are handled by the InputFileSystem and 
OutputFileSystem that wrap

Reply via email to