File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/impl Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 30
30
import org .junit .Test ;
31
31
import software .amazon .awssdk .awscore .retry .conditions .RetryOnErrorCodeCondition ;
32
32
import software .amazon .awssdk .core .exception .SdkClientException ;
33
+ import software .amazon .awssdk .core .exception .SdkException ;
33
34
import software .amazon .awssdk .core .retry .RetryPolicyContext ;
34
35
import software .amazon .awssdk .services .s3 .model .NoSuchKeyException ;
35
36
import software .amazon .encryption .s3 .S3EncryptionClientException ;
@@ -163,4 +164,12 @@ public void testEncryptionClientExceptionExtraction() throws Throwable {
163
164
new S3EncryptionClientException ("middle" , NoSuchKeyException .builder ().build ())));
164
165
});
165
166
}
167
+
168
+ @ Test
169
+ public void testNonEncryptionClientExceptionExtraction () throws Throwable {
170
+ intercept (SdkException .class , () -> {
171
+ throw maybeExtractSdkException (
172
+ sdkException ("top" , sdkException ("middle" , new NoConstructorIOE ())));
173
+ });
174
+ }
166
175
}
You can’t perform that action at this time.
0 commit comments