steveloughran commented on code in PR #6425:
URL: https://github.com/apache/hadoop/pull/6425#discussion_r1447486233
##########
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractVectoredRead.java:
##########
@@ -72,9 +78,40 @@ public void testEOFRanges() throws Exception {
FileSystem fs = getFileSystem();
List<FileRange> fileRanges = new ArrayList<>();
fileRanges.add(FileRange.createFileRange(DATASET_LEN, 100));
- verifyExceptionalVectoredRead(fs, fileRanges, EOFException.class);
+ verifyExceptionalVectoredRead(fs, fileRanges,
RangeNotSatisfiableEOFException.class);
}
+ /**
+ * Verify response to a vector read request which is beyond the
+ * real length of the file.
+ * Unlike the {@link #testEOFRanges()} test, the input stream in
+ * this test thinks the file is longer than it is, so the call
+ * fails in the GET request.
+ */
+ @Test
+ public void testEOFRanges416Handling() throws Exception {
+ FileSystem fs = getFileSystem();
+
+ CompletableFuture<FSDataInputStream> builder =
+ fs.openFile(path(VECTORED_READ_FILE_NAME))
+ .mustLong(FS_OPTION_OPENFILE_LENGTH, DATASET_LEN + 1024)
Review Comment:
simulates EOF problems and verify reopen failures...doesn't simulate
connection failure within file length. that'd be trickier
--
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]