Skip to content

Commit 3fcf03a

Browse files
authored
HADOOP-19646. [Addendum] [JDK17] Migrate hadoop-aws module from JUnit4 Assume to JUnit5 Assumptions. (#7951) Contributed by Hualong Zhang.
* HADOOP-19646. [Addendum] [JDK17] Migrate hadoop-aws module from JUnit4 Assume to JUnit5 Assumptions. Reviewed-by: Cheng Pan <[email protected]> Signed-off-by: Shilun Fan <[email protected]>
1 parent 3924100 commit 3fcf03a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
SSLChannelMode.Default_JSSE_with_GCM;
6060
import static org.apache.hadoop.security.ssl.DelegatingSSLSocketFactory.
6161
SSLChannelMode.OpenSSL;
62-
import static org.junit.Assume.assumeTrue;
62+
import static org.junit.jupiter.api.Assumptions.assumeTrue;
6363

6464

6565
/**

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.assertj.core.api.Assertions;
2828
import org.junit.jupiter.api.BeforeEach;
2929
import org.junit.jupiter.api.Test;
30+
import org.opentest4j.AssertionFailedError;
3031
import software.amazon.awssdk.services.s3.model.MultipartUpload;
3132

3233
import org.apache.hadoop.conf.Configuration;
@@ -316,7 +317,7 @@ public void testDistCp() throws Throwable {
316317
options, getConfiguration());
317318
} else {
318319
// distcp fails if uploads are visible
319-
intercept(org.junit.ComparisonFailure.class, () -> {
320+
intercept(AssertionFailedError.class, () -> {
320321
DistCpTestUtils.assertRunDistCp(DistCpConstants.SUCCESS, src.toString(), dest.toString(),
321322
options, getConfiguration());
322323
});
@@ -339,7 +340,7 @@ public void testDistCpNoIterator() throws Throwable {
339340
options, getConfiguration());
340341
} else {
341342
// distcp fails if uploads are visible
342-
intercept(org.junit.ComparisonFailure.class, () -> {
343+
intercept(AssertionFailedError.class, () -> {
343344
DistCpTestUtils.assertRunDistCp(DistCpConstants.SUCCESS, src.toString(), dest.toString(),
344345
options, getConfiguration());
345346
});

0 commit comments

Comments
 (0)