- * This is done by creating new FS instances and then
- * requesting an on-demand transfer manager from the store.
- * As this is only done once per FS instance, a new FS is
- * required per test case.
+ * These tests are inevitably brittle against SDK updates.
*/
public class ITestAwsSdkWorkarounds extends AbstractS3ATestBase {
@@ -53,13 +50,6 @@ public class ITestAwsSdkWorkarounds extends AbstractS3ATestBase {
private static final Logger XFER_LOG =
LoggerFactory.getLogger(AwsSdkWorkarounds.TRANSFER_MANAGER);
- /**
- * This is the string which keeps being printed.
- * {@value}.
- */
- private static final String FORBIDDEN =
- "The provided S3AsyncClient is an instance of MultipartS3AsyncClient";
-
/**
* Marginal test run speedup by skipping needless test dir cleanup.
* @throws IOException failure
@@ -70,23 +60,7 @@ protected void deleteTestDirInTeardown() throws IOException {
}
/**
- * Test instantiation with logging disabled.
- */
- @Test
- public void testQuietLogging() throws Throwable {
- // simulate the base state of logging
- noisyLogging();
- // creating a new FS switches to quiet logging
- try (S3AFileSystem newFs = newFileSystem()) {
- String output = createAndLogTransferManager(newFs);
- Assertions.assertThat(output)
- .describedAs("LOG output")
- .doesNotContain(FORBIDDEN);
- }
- }
-
- /**
- * Test instantiation with logging disabled.
+ * Test instantiation with logging enabled.
*/
@Test
public void testNoisyLogging() throws Throwable {
@@ -95,9 +69,8 @@ public void testNoisyLogging() throws Throwable {
noisyLogging();
String output = createAndLogTransferManager(newFs);
Assertions.assertThat(output)
- .describedAs("LOG output does not contain the forbidden text."
- + " Has the SDK been fixed?")
- .contains(FORBIDDEN);
+ .describedAs("LOG output")
+ .isEmpty();
}
}
diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/tools/ITestBucketTool.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/tools/ITestBucketTool.java
index 50ffce7d87a96..b37e6eec7c822 100644
--- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/tools/ITestBucketTool.java
+++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/tools/ITestBucketTool.java
@@ -157,6 +157,7 @@ public void testSimpleBucketWithZoneParam() throws Throwable {
@Test
public void testS3ExpressBucketWithoutZoneParam() throws Throwable {
+ assumeStoreAwsHosted(getFileSystem());
expectErrorCode(EXIT_USAGE,
intercept(ExitUtil.ExitException.class, NO_ZONE_SUPPLIED, () ->
bucketTool.exec("bucket", d(CREATE),
diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/sdk/TestAWSV2SDK.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/sdk/TestAWSV2SDK.java
index fca9fcc300cbd..1ddd3377cf0a8 100644
--- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/sdk/TestAWSV2SDK.java
+++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/sdk/TestAWSV2SDK.java
@@ -57,7 +57,7 @@ public void testShadedClasses() throws IOException {
assertThat(v2ClassPath)
.as("AWS V2 SDK should be present on the classpath").isNotNull();
List