From ce5b4812f0f43ba9271343f405749d18794d672c Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Fri, 8 Apr 2016 17:09:47 +0100 Subject: [PATCH] HADOOP-12753 S3A JUnit tests failing if using HTTP proxy. (Zoran Rajic via stevel) --- .../org/apache/hadoop/fs/s3a/TestS3AConfiguration.java | 2 ++ .../hadoop/fs/s3a/scale/TestS3ADeleteManyFiles.java | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AConfiguration.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AConfiguration.java index e74ebca50b..ae1539d4c8 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AConfiguration.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AConfiguration.java @@ -123,6 +123,7 @@ public class TestS3AConfiguration { @Test public void testProxyPortWithoutHost() throws Exception { conf = new Configuration(); + conf.unset(Constants.PROXY_HOST); conf.setInt(Constants.MAX_ERROR_RETRIES, 2); conf.setInt(Constants.PROXY_PORT, 1); try { @@ -140,6 +141,7 @@ public class TestS3AConfiguration { @Test public void testAutomaticProxyPortSelection() throws Exception { conf = new Configuration(); + conf.unset(Constants.PROXY_PORT); conf.setInt(Constants.MAX_ERROR_RETRIES, 2); conf.set(Constants.PROXY_HOST, "127.0.0.1"); conf.set(Constants.SECURE_CONNECTIONS, "true"); diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADeleteManyFiles.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADeleteManyFiles.java index d521ba8ac9..2930e96d0c 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADeleteManyFiles.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADeleteManyFiles.java @@ -44,6 +44,15 @@ public class TestS3ADeleteManyFiles extends S3AScaleTestBase { @Rule public Timeout testTimeout = new Timeout(30 * 60 * 1000); + /** + * CAUTION: If this test starts failing, please make sure that the + * {@link org.apache.hadoop.fs.s3a.Constants#MAX_THREADS} configuration is not + * set too low. Alternatively, consider reducing the + * scale.test.operation.count parameter in + * getOperationCount(). + * + * @see #getOperationCount() + */ @Test public void testBulkRenameAndDelete() throws Throwable { final Path scaleTestDir = getTestPath();