Skip to content

Commit 5c915db

Browse files
committed
HADOOP-19221. mockito regression
Mockito test failed because mockito tests are so brittle. Change-Id: Ia5e8a4fdb74b08a04af58f3b5c868392758cf9f3
1 parent 299675d commit 5c915db

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/troubleshooting_s3a.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ Retrying _should_ make it go away.
579579
The 500 error is considered retryable by the AWS SDK, which will have already
580580
tried it `fs.s3a.attempts.maximum` times before reaching the S3A client -which
581581
will also retry.
582-
582+
583583
The S3A client will attempt to retry on a 500 (or other 5xx error other than 501/503)
584584
if the option `fs.s3a.retry.http.5xx.errors` is set to `true`.
585585
This is the default.

hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3ABlockOutputStream.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void setUp() throws Exception {
8787

8888
@Test
8989
public void testFlushNoOpWhenStreamClosed() throws Exception {
90-
doThrow(new IOException()).when(stream).checkOpen();
90+
doThrow(new StreamClosedException()).when(stream).checkOpen();
9191

9292
stream.flush();
9393
}
@@ -115,7 +115,12 @@ public void testWriteOperationHelperPartLimits() throws Throwable {
115115
"uploadId", 50000, 1024));
116116
}
117117

118-
static class StreamClosedException extends IOException {}
118+
static class StreamClosedException extends ClosedIOException {
119+
120+
StreamClosedException() {
121+
super("path", "message");
122+
}
123+
}
119124

120125
@Test
121126
public void testStreamClosedAfterAbort() throws Exception {

0 commit comments

Comments
 (0)