llama90 commented on code in PR #42093:
URL: https://github.com/apache/arrow/pull/42093#discussion_r1642890304
##########
java/tools/src/test/java/org/apache/arrow/tools/TestFileRoundtrip.java:
##########
@@ -78,19 +77,17 @@ public void testDiffFolder() throws Exception {
@Test
public void testNotPreparedInput() throws Exception {
- File testInFile = testFolder.newFile("testIn.arrow");
- File testOutFile = testFolder.newFile("testOut.arrow");
+ File testInFile = new File(testFolder, "testIn.arrow");
+ File testOutFile = new File(testFolder, "testOut.arrow");
String[] args = {"-i", testInFile.getAbsolutePath(), "-o",
testOutFile.getAbsolutePath()};
-
- // In JUnit 5, since the file itself is not created, the exception and
message will be
- // different.
Exception exception =
assertThrows(
- InvalidArrowFileException.class,
+ IllegalArgumentException.class,
() -> {
new FileRoundtrip(System.err).run(args);
});
- assertEquals("file too small: 0", exception.getMessage());
+
+ assertTrue(exception.getMessage().contains("input file not found"));
Review Comment:
I changed the name of the existing test to `testNotFoundInput` and added a
new test called `testSmallSizeInput`.
--
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]