[
https://issues.apache.org/jira/browse/HADOOP-18392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17576693#comment-17576693
]
ASF GitHub Bot commented on HADOOP-18392:
-----------------------------------------
steveloughran commented on code in PR #4704:
URL: https://github.com/apache/hadoop/pull/4704#discussion_r940079934
##########
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractVectoredReadTest.java:
##########
@@ -281,16 +281,7 @@ public void testEOFRanges() throws Exception {
in.readVectored(fileRanges, allocate);
for (FileRange res : fileRanges) {
CompletableFuture<ByteBuffer> data = res.getData();
- try {
- ByteBuffer buffer = data.get();
- // Shouldn't reach here.
- Assert.fail("EOFException must be thrown while reading EOF");
- } catch (ExecutionException ex) {
- // ignore as expected.
- } catch (Exception ex) {
- LOG.error("Exception while running vectored read ", ex);
- Assert.fail("Exception while running vectored read " + ex);
- }
+ intercept(ExecutionException.class, (Callable<ByteBuffer>) data::get);
Review Comment:
there's an interceptFuture() variant where you can also specify the timeout
> Propagate vectored s3a input stream stats to file system stats.
> ---------------------------------------------------------------
>
> Key: HADOOP-18392
> URL: https://issues.apache.org/jira/browse/HADOOP-18392
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Reporter: Mukund Thakur
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]