davisusanibar commented on code in PR #34312:
URL: https://github.com/apache/arrow/pull/34312#discussion_r1150875075


##########
java/dataset/src/test/java/org/apache/arrow/dataset/file/TestFileSystemDataset.java:
##########
@@ -386,6 +388,27 @@ public void testBaseCsvRead() throws Exception {
     }
   }
 
+  @Test
+  public void testResourceToLoad() throws IOException {
+    if (System.getProperty("os.name").equalsIgnoreCase("Windows")) {
+      assertEquals("\\", File.separator);
+      final String pathWithoutFileSeparator = "/" + "avroschema" + "/" + 
"user.avsc";
+      try (final InputStream stream = 
TestFileSystemDataset.class.getResourceAsStream(pathWithoutFileSeparator)) {
+        if (stream == null) {
+          throw new FileNotFoundException(pathWithoutFileSeparator);
+        }
+      }
+      final String pathWithFileSeparator = File.separator + "avroschema" + 
File.separator + "user.avsc";
+      Assertions.assertThrows(FileNotFoundException.class, () -> {
+        try (final InputStream stream = 
TestFileSystemDataset.class.getResourceAsStream(pathWithFileSeparator)) {
+          if (stream == null) {
+            throw new FileNotFoundException(pathWithFileSeparator);
+          }
+        }
+      }, "FileNotFound \\avroschema\\user.avsc");
+    }
+  }
+

Review Comment:
   Ohhh ok ok, I got your point. Then, there are two parts:
   
   1. Run Java dataset (+ all JNI modules) test code also on Windows OS
   2. Fix current JNI load resources able to run on Windows OS
   
   This fix is for part (2)
   
   Could be ok to create another ticket for the option (1)? 
   
   



-- 
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: github-unsubscr...@arrow.apache.org

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

Reply via email to