From 027d76fa8c92c7dda0612a06d9f29172f2e63dc3 Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Tue, 23 Aug 2016 07:19:20 -0700 Subject: [PATCH] HADOOP-13446. Support running isolated unit tests separate from AWS integration tests. Contributed by Chris Nauroth. (cherry picked from commit cda68de9b913878210118a6637a1d0eb950c26ad) --- hadoop-project/pom.xml | 5 + hadoop-tools/hadoop-aws/pom.xml | 95 +++++++++++++++---- .../site/markdown/tools/hadoop-aws/index.md | 67 +++++++++---- ...Create.java => ITestS3ContractCreate.java} | 6 +- ...Delete.java => ITestS3ContractDelete.java} | 5 +- ...ctMkdir.java => ITestS3ContractMkdir.java} | 6 +- ...ractOpen.java => ITestS3ContractOpen.java} | 6 +- ...Rename.java => ITestS3ContractRename.java} | 5 +- ...otDir.java => ITestS3ContractRootDir.java} | 4 +- ...ractSeek.java => ITestS3ContractSeek.java} | 6 +- ...reate.java => ITestS3AContractCreate.java} | 6 +- ...elete.java => ITestS3AContractDelete.java} | 5 +- ...istCp.java => ITestS3AContractDistCp.java} | 2 +- ...ava => ITestS3AContractGetFileStatus.java} | 6 +- ...tMkdir.java => ITestS3AContractMkdir.java} | 4 +- ...actOpen.java => ITestS3AContractOpen.java} | 5 +- ...ename.java => ITestS3AContractRename.java} | 7 +- ...tDir.java => ITestS3AContractRootDir.java} | 4 +- ...actSeek.java => ITestS3AContractSeek.java} | 5 +- ...reate.java => ITestS3NContractCreate.java} | 5 +- ...elete.java => ITestS3NContractDelete.java} | 5 +- ...tMkdir.java => ITestS3NContractMkdir.java} | 4 +- ...actOpen.java => ITestS3NContractOpen.java} | 5 +- ...ename.java => ITestS3NContractRename.java} | 5 +- ...tDir.java => ITestS3NContractRootDir.java} | 4 +- ...actSeek.java => ITestS3NContractSeek.java} | 5 +- ...=> ITestInMemoryS3FileSystemContract.java} | 9 +- ...estBlockingThreadPoolExecutorService.java} | 4 +- ...va => ITestS3AAWSCredentialsProvider.java} | 4 +- ...l.java => ITestS3ABlockingThreadPool.java} | 2 +- ...ABlocksize.java => ITestS3ABlocksize.java} | 7 +- ...ration.java => ITestS3AConfiguration.java} | 14 ++- ...URL.java => ITestS3ACredentialsInURL.java} | 6 +- ...ncryption.java => ITestS3AEncryption.java} | 2 +- ...estS3AEncryptionAlgorithmPropagation.java} | 3 +- ...> ITestS3AEncryptionFastOutputStream.java} | 2 +- ...ling.java => ITestS3AFailureHandling.java} | 6 +- ...eam.java => ITestS3AFastOutputStream.java} | 2 +- ...st.java => ITestS3AFileOperationCost.java} | 4 +- ...t.java => ITestS3AFileSystemContract.java} | 8 +- ...java => ITestS3ATemporaryCredentials.java} | 4 +- ...eContext.java => ITestS3AFileContext.java} | 4 +- ...va => ITestS3AFileContextCreateMkdir.java} | 4 +- ...=> ITestS3AFileContextMainOperations.java} | 4 +- ...ava => ITestS3AFileContextStatistics.java} | 7 +- ...xtURI.java => ITestS3AFileContextURI.java} | 7 +- ...Util.java => ITestS3AFileContextUtil.java} | 4 +- ....java => ITestS3ADeleteFilesOneByOne.java} | 6 +- ...iles.java => ITestS3ADeleteManyFiles.java} | 4 +- ...java => ITestS3ADirectoryPerformance.java} | 4 +- ...va => ITestS3AInputStreamPerformance.java} | 8 +- .../s3a/yarn/{TestS3A.java => ITestS3A.java} | 7 +- ...ster.java => ITestS3AMiniYarnCluster.java} | 14 ++- ...stInMemoryNativeS3FileSystemContract.java} | 7 +- ... => ITestJets3tNativeFileSystemStore.java} | 10 +- ...TestJets3tNativeS3FileSystemContract.java} | 7 +- 56 files changed, 316 insertions(+), 140 deletions(-) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/{TestS3ContractCreate.java => ITestS3ContractCreate.java} (90%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/{TestS3ContractDelete.java => ITestS3ContractDelete.java} (90%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/{TestS3ContractMkdir.java => ITestS3ContractMkdir.java} (90%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/{TestS3ContractOpen.java => ITestS3ContractOpen.java} (90%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/{TestS3ContractRename.java => ITestS3ContractRename.java} (90%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/{TestS3ContractRootDir.java => ITestS3ContractRootDir.java} (92%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/{TestS3ContractSeek.java => ITestS3ContractSeek.java} (91%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/{TestS3AContractCreate.java => ITestS3AContractCreate.java} (90%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/{TestS3AContractDelete.java => ITestS3AContractDelete.java} (90%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/{TestS3AContractDistCp.java => ITestS3AContractDistCp.java} (95%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/{TestS3AContractGetFileStatus.java => ITestS3AContractGetFileStatus.java} (92%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/{TestS3AContractMkdir.java => ITestS3AContractMkdir.java} (91%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/{TestS3AContractOpen.java => ITestS3AContractOpen.java} (90%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/{TestS3AContractRename.java => ITestS3AContractRename.java} (93%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/{TestS3AContractRootDir.java => ITestS3AContractRootDir.java} (95%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/{TestS3AContractSeek.java => ITestS3AContractSeek.java} (90%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/{TestS3NContractCreate.java => ITestS3NContractCreate.java} (92%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/{TestS3NContractDelete.java => ITestS3NContractDelete.java} (90%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/{TestS3NContractMkdir.java => ITestS3NContractMkdir.java} (92%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/{TestS3NContractOpen.java => ITestS3NContractOpen.java} (91%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/{TestS3NContractRename.java => ITestS3NContractRename.java} (90%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/{TestS3NContractRootDir.java => ITestS3NContractRootDir.java} (93%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/{TestS3NContractSeek.java => ITestS3NContractSeek.java} (90%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3/{TestInMemoryS3FileSystemContract.java => ITestInMemoryS3FileSystemContract.java} (85%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestBlockingThreadPoolExecutorService.java => ITestBlockingThreadPoolExecutorService.java} (98%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestS3AAWSCredentialsProvider.java => ITestS3AAWSCredentialsProvider.java} (98%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestS3ABlockingThreadPool.java => ITestS3ABlockingThreadPool.java} (98%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestS3ABlocksize.java => ITestS3ABlocksize.java} (94%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestS3AConfiguration.java => ITestS3AConfiguration.java} (97%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestS3ACredentialsInURL.java => ITestS3ACredentialsInURL.java} (97%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestS3AEncryption.java => ITestS3AEncryption.java} (98%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestS3AEncryptionAlgorithmPropagation.java => ITestS3AEncryptionAlgorithmPropagation.java} (96%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestS3AEncryptionFastOutputStream.java => ITestS3AEncryptionFastOutputStream.java} (94%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestS3AFailureHandling.java => ITestS3AFailureHandling.java} (95%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestS3AFastOutputStream.java => ITestS3AFastOutputStream.java} (98%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestS3AFileOperationCost.java => ITestS3AFileOperationCost.java} (98%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestS3AFileSystemContract.java => ITestS3AFileSystemContract.java} (94%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/{TestS3ATemporaryCredentials.java => ITestS3ATemporaryCredentials.java} (97%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/{TestS3AFileContext.java => ITestS3AFileContext.java} (86%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/{TestS3AFileContextCreateMkdir.java => ITestS3AFileContextCreateMkdir.java} (90%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/{TestS3AFileContextMainOperations.java => ITestS3AFileContextMainOperations.java} (93%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/{TestS3AFileContextStatistics.java => ITestS3AFileContextStatistics.java} (88%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/{TestS3AFileContextURI.java => ITestS3AFileContextURI.java} (85%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/{TestS3AFileContextUtil.java => ITestS3AFileContextUtil.java} (89%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/{TestS3ADeleteFilesOneByOne.java => ITestS3ADeleteFilesOneByOne.java} (89%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/{TestS3ADeleteManyFiles.java => ITestS3ADeleteManyFiles.java} (97%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/{TestS3ADirectoryPerformance.java => ITestS3ADirectoryPerformance.java} (98%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/{TestS3AInputStreamPerformance.java => ITestS3AInputStreamPerformance.java} (99%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/{TestS3A.java => ITestS3A.java} (94%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/{TestS3AMiniYarnCluster.java => ITestS3AMiniYarnCluster.java} (96%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/{TestInMemoryNativeS3FileSystemContract.java => ITestInMemoryNativeS3FileSystemContract.java} (84%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/{TestJets3tNativeFileSystemStore.java => ITestJets3tNativeFileSystemStore.java} (96%) rename hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/{TestJets3tNativeS3FileSystemContract.java => ITestJets3tNativeS3FileSystemContract.java} (86%) diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml index dfb2224cbc9..a8d0024bc2c 100644 --- a/hadoop-project/pom.xml +++ b/hadoop-project/pom.xml @@ -1048,6 +1048,11 @@ maven-surefire-plugin ${maven-surefire-plugin.version} + + org.apache.maven.plugins + maven-failsafe-plugin + ${maven-failsafe-plugin.version} + org.apache.maven.plugins maven-install-plugin diff --git a/hadoop-tools/hadoop-aws/pom.xml b/hadoop-tools/hadoop-aws/pom.xml index ebf32beb1c4..c91081d6ffe 100644 --- a/hadoop-tools/hadoop-aws/pom.xml +++ b/hadoop-tools/hadoop-aws/pom.xml @@ -46,7 +46,7 @@ - true + true @@ -57,11 +57,16 @@ - false + false parallel-tests + + + parallel-tests + + @@ -96,12 +101,32 @@ org.apache.maven.plugins maven-surefire-plugin + + ${testsThreadCount} + false + ${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true + + ${test.build.data}/${surefire.forkNumber} + ${test.build.dir}/${surefire.forkNumber} + ${hadoop.tmp.dir}/${surefire.forkNumber} + + + + + + fork-${surefire.forkNumber} + + + + + org.apache.maven.plugins + maven-failsafe-plugin - default-test - test + default-integration-test - test + integration-test + verify ${testsThreadCount} @@ -129,32 +154,35 @@ + + **/ITest*.java + - **/TestJets3tNativeS3FileSystemContract.java - **/TestS3ABlockingThreadPool.java - **/TestS3AFastOutputStream.java - **/TestS3AFileSystemContract.java - **/TestS3AMiniYarnCluster.java - **/Test*Root*.java + **/ITestJets3tNativeS3FileSystemContract.java + **/ITestS3ABlockingThreadPool.java + **/ITestS3AFastOutputStream.java + **/ITestS3AFileSystemContract.java + **/ITestS3AMiniYarnCluster.java + **/ITest*Root*.java - sequential-tests - test + sequential-integration-tests - test + integration-test + verify - **/TestJets3tNativeS3FileSystemContract.java - **/TestS3ABlockingThreadPool.java - **/TestS3AFastOutputStream.java - **/TestS3AFileSystemContract.java - **/TestS3AMiniYarnCluster.java - **/Test*Root*.java + **/ITestJets3tNativeS3FileSystemContract.java + **/ITestS3ABlockingThreadPool.java + **/ITestS3AFastOutputStream.java + **/ITestS3AFileSystemContract.java + **/ITestS3AMiniYarnCluster.java + **/ITest*Root*.java @@ -163,6 +191,33 @@ + + sequential-tests + + + !parallel-tests + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + integration-test + verify + + + 3600 + + + + + + + diff --git a/hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md b/hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md index 5270dfa8381..67972caaea7 100644 --- a/hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md +++ b/hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md @@ -1375,11 +1375,18 @@ works with S3 to something lower. See [AWS documentation](http://docs.aws.amazon ## Testing the S3 filesystem clients -Due to eventual consistency, tests may fail without reason. Transient -failures, which no longer occur upon rerunning the test, should thus be ignored. +This module includes both unit tests, which can run in isolation without +connecting to the S3 service, and integration tests, which require a working +connection to S3 to interact with a bucket. Unit test suites follow the naming +convention `Test*.java`. Integration tests follow the naming convention +`ITest*.java`. -To test the S3* filesystem clients, you need to provide two files -which pass in authentication details to the test runner +Due to eventual consistency, integration tests may fail without reason. +Transient failures, which no longer occur upon rerunning the test, should thus +be ignored. + +To integration test the S3* filesystem clients, you need to provide two files +which pass in authentication details to the test runner. 1. `auth-keys.xml` 1. `core-site.xml` @@ -1399,7 +1406,8 @@ need to apply a specific, non-default property change during the tests. The presence of this file triggers the testing of the S3 classes. -Without this file, *none of the tests in this module will be executed* +Without this file, *none of the integration tests in this module will be +executed*. The XML file must contain all the ID/key information needed to connect each of the filesystem clients to the object stores, and a URL for @@ -1586,23 +1594,50 @@ source code tree, it is not going to get accidentally committed. After completing the configuration, execute the test run through Maven. - mvn clean test + mvn clean verify -It's also possible to execute multiple test suites in parallel by enabling the -`parallel-tests` Maven profile. The tests spend most of their time blocked on -network I/O with the S3 service, so running in parallel tends to complete full -test runs faster. +It's also possible to execute multiple test suites in parallel by passing the +`parallel-tests` property on the command line. The tests spend most of their +time blocked on network I/O with the S3 service, so running in parallel tends to +complete full test runs faster. - mvn -Pparallel-tests clean test + mvn -Dparallel-tests clean verify Some tests must run with exclusive access to the S3 bucket, so even with the -`parallel-tests` profile enabled, several test suites will run in serial in a -separate Maven execution step after the parallel tests. +`parallel-tests` property, several test suites will run in serial in a separate +Maven execution step after the parallel tests. -By default, the `parallel-tests` profile runs 4 test suites concurrently. This -can be tuned by passing the `testsThreadCount` argument. +By default, `parallel-tests` runs 4 test suites concurrently. This can be tuned +by passing the `testsThreadCount` property. - mvn -Pparallel-tests -DtestsThreadCount=8 clean test + mvn -Dparallel-tests -DtestsThreadCount=8 clean verify + +To run just unit tests, which do not require S3 connectivity or AWS credentials, +use any of the above invocations, but switch the goal to `test` instead of +`verify`. + + mvn clean test + + mvn -Dparallel-tests clean test + + mvn -Dparallel-tests -DtestsThreadCount=8 clean test + +To run only a specific named subset of tests, pass the `test` property for unit +tests or the `it.test` property for integration tests. + + mvn clean test -Dtest=TestS3AInputPolicies + + mvn clean verify -Dit.test=ITestS3AFileContextStatistics + + mvn clean verify -Dtest=TestS3A* -Dit.test=ITestS3A* + +Note that when running a specific subset of tests, the patterns passed in `test` +and `it.test` override the configuration of which tests need to run in isolation +in a separate serial phase (mentioned above). This can cause unpredictable +results, so the recommendation is to avoid passing `parallel-tests` in +combination with `test` or `it.test`. If you know that you are specifying only +tests that can run safely in parallel, then it will work. For wide patterns, +like `ITestS3A*` shown above, it may cause unpredictable test failures. ### Testing against different regions diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractCreate.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractCreate.java similarity index 90% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractCreate.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractCreate.java index 4e98db9c78b..e003f287309 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractCreate.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractCreate.java @@ -21,10 +21,12 @@ package org.apache.hadoop.fs.contract.s3; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractCreateTest; import org.apache.hadoop.fs.contract.AbstractFSContract; -import org.apache.hadoop.fs.contract.ContractTestUtils; +/** + * S3 contract tests creating files. + */ @Deprecated -public class TestS3ContractCreate extends AbstractContractCreateTest { +public class ITestS3ContractCreate extends AbstractContractCreateTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractDelete.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractDelete.java similarity index 90% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractDelete.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractDelete.java index 37b4ed2852d..307e521d552 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractDelete.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractDelete.java @@ -22,8 +22,11 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractDeleteTest; import org.apache.hadoop.fs.contract.AbstractFSContract; +/** + * S3 contract tests covering deletes. + */ @Deprecated -public class TestS3ContractDelete extends AbstractContractDeleteTest { +public class ITestS3ContractDelete extends AbstractContractDeleteTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractMkdir.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractMkdir.java similarity index 90% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractMkdir.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractMkdir.java index 1e6ac7f10af..33683938a65 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractMkdir.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractMkdir.java @@ -21,10 +21,12 @@ package org.apache.hadoop.fs.contract.s3; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractMkdirTest; import org.apache.hadoop.fs.contract.AbstractFSContract; -import org.apache.hadoop.fs.contract.ContractTestUtils; +/** + * Test dir operations on S3. + */ @Deprecated -public class TestS3ContractMkdir extends AbstractContractMkdirTest { +public class ITestS3ContractMkdir extends AbstractContractMkdirTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractOpen.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractOpen.java similarity index 90% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractOpen.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractOpen.java index 2af61de750f..c8cc998dd80 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractOpen.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractOpen.java @@ -21,10 +21,12 @@ package org.apache.hadoop.fs.contract.s3; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractOpenTest; import org.apache.hadoop.fs.contract.AbstractFSContract; -import org.apache.hadoop.fs.contract.ContractTestUtils; +/** + * S3 contract tests opening files. + */ @Deprecated -public class TestS3ContractOpen extends AbstractContractOpenTest { +public class ITestS3ContractOpen extends AbstractContractOpenTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractRename.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractRename.java similarity index 90% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractRename.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractRename.java index ba454787ea9..e4dcb13ed4a 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractRename.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractRename.java @@ -22,8 +22,11 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractRenameTest; import org.apache.hadoop.fs.contract.AbstractFSContract; +/** + * S3 contract tests covering rename. + */ @Deprecated -public class TestS3ContractRename extends AbstractContractRenameTest { +public class ITestS3ContractRename extends AbstractContractRenameTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractRootDir.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractRootDir.java similarity index 92% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractRootDir.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractRootDir.java index 452862d17ad..7003640d283 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractRootDir.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractRootDir.java @@ -26,10 +26,10 @@ import org.junit.Ignore; import org.junit.Test; /** - * root dir operations against an S3 bucket + * root dir operations against an S3 bucket. */ @Deprecated -public class TestS3ContractRootDir extends AbstractContractRootDirectoryTest { +public class ITestS3ContractRootDir extends AbstractContractRootDirectoryTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractSeek.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractSeek.java similarity index 91% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractSeek.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractSeek.java index b15c0a25a60..67b16b9e3ab 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/TestS3ContractSeek.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3/ITestS3ContractSeek.java @@ -21,13 +21,15 @@ package org.apache.hadoop.fs.contract.s3; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractSeekTest; import org.apache.hadoop.fs.contract.AbstractFSContract; -import org.apache.hadoop.fs.contract.ContractTestUtils; import org.junit.Ignore; import org.junit.Test; +/** + * S3 contract tests covering file seek. + */ @Deprecated -public class TestS3ContractSeek extends AbstractContractSeekTest { +public class ITestS3ContractSeek extends AbstractContractSeekTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractCreate.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractCreate.java similarity index 90% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractCreate.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractCreate.java index 035252bf5fa..d2a858f615e 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractCreate.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractCreate.java @@ -21,9 +21,11 @@ package org.apache.hadoop.fs.contract.s3a; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractCreateTest; import org.apache.hadoop.fs.contract.AbstractFSContract; -import org.apache.hadoop.fs.contract.ContractTestUtils; -public class TestS3AContractCreate extends AbstractContractCreateTest { +/** + * S3A contract tests creating files. + */ +public class ITestS3AContractCreate extends AbstractContractCreateTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractDelete.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractDelete.java similarity index 90% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractDelete.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractDelete.java index 733a517b8ec..a47dcaef61e 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractDelete.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractDelete.java @@ -22,7 +22,10 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractDeleteTest; import org.apache.hadoop.fs.contract.AbstractFSContract; -public class TestS3AContractDelete extends AbstractContractDeleteTest { +/** + * S3A contract tests covering deletes. + */ +public class ITestS3AContractDelete extends AbstractContractDeleteTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractDistCp.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractDistCp.java similarity index 95% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractDistCp.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractDistCp.java index 7eb0afab133..28278feea90 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractDistCp.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractDistCp.java @@ -27,7 +27,7 @@ import org.apache.hadoop.tools.contract.AbstractContractDistCpTest; /** * Contract test suite covering S3A integration with DistCp. */ -public class TestS3AContractDistCp extends AbstractContractDistCpTest { +public class ITestS3AContractDistCp extends AbstractContractDistCpTest { private static final long MULTIPART_SETTING = 8 * 1024 * 1024; // 8 MB diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractGetFileStatus.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractGetFileStatus.java similarity index 92% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractGetFileStatus.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractGetFileStatus.java index 5937d490ab6..c7ed5a3df3d 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractGetFileStatus.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractGetFileStatus.java @@ -23,7 +23,11 @@ import org.apache.hadoop.fs.contract.AbstractContractGetFileStatusTest; import org.apache.hadoop.fs.s3a.Constants; import org.apache.hadoop.fs.s3a.S3ATestUtils; -public class TestS3AContractGetFileStatus extends AbstractContractGetFileStatusTest { +/** + * S3A contract tests covering getFileStatus. + */ +public class ITestS3AContractGetFileStatus + extends AbstractContractGetFileStatusTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractMkdir.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractMkdir.java similarity index 91% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractMkdir.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractMkdir.java index a312782bcbb..d953e7eb6ae 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractMkdir.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractMkdir.java @@ -23,9 +23,9 @@ import org.apache.hadoop.fs.contract.AbstractContractMkdirTest; import org.apache.hadoop.fs.contract.AbstractFSContract; /** - * Test dir operations on S3 + * Test dir operations on S3A. */ -public class TestS3AContractMkdir extends AbstractContractMkdirTest { +public class ITestS3AContractMkdir extends AbstractContractMkdirTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractOpen.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractOpen.java similarity index 90% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractOpen.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractOpen.java index f735deb1451..a7bdc0d3f1b 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractOpen.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractOpen.java @@ -22,7 +22,10 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractOpenTest; import org.apache.hadoop.fs.contract.AbstractFSContract; -public class TestS3AContractOpen extends AbstractContractOpenTest { +/** + * S3A contract tests opening files. + */ +public class ITestS3AContractOpen extends AbstractContractOpenTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractRename.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractRename.java similarity index 93% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractRename.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractRename.java index af1ed377ef7..5dba03d664c 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractRename.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractRename.java @@ -23,13 +23,14 @@ import org.apache.hadoop.fs.contract.AbstractContractRenameTest; import org.apache.hadoop.fs.contract.AbstractFSContract; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; -import org.apache.hadoop.fs.contract.ContractTestUtils; -import org.junit.Test; import static org.apache.hadoop.fs.contract.ContractTestUtils.dataset; import static org.apache.hadoop.fs.contract.ContractTestUtils.writeDataset; -public class TestS3AContractRename extends AbstractContractRenameTest { +/** + * S3A contract tests covering rename. + */ +public class ITestS3AContractRename extends AbstractContractRenameTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractRootDir.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractRootDir.java similarity index 95% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractRootDir.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractRootDir.java index 1cf1eb850ce..8383a77365b 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractRootDir.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractRootDir.java @@ -31,11 +31,11 @@ import org.slf4j.LoggerFactory; /** * root dir operations against an S3 bucket. */ -public class TestS3AContractRootDir extends +public class ITestS3AContractRootDir extends AbstractContractRootDirectoryTest { private static final Logger LOG = - LoggerFactory.getLogger(TestS3AContractRootDir.class); + LoggerFactory.getLogger(ITestS3AContractRootDir.class); @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractSeek.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractSeek.java similarity index 90% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractSeek.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractSeek.java index d677ec423f7..1572fbc880b 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/TestS3AContractSeek.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3a/ITestS3AContractSeek.java @@ -22,7 +22,10 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractSeekTest; import org.apache.hadoop.fs.contract.AbstractFSContract; -public class TestS3AContractSeek extends AbstractContractSeekTest { +/** + * S3A contract tests covering file seek. + */ +public class ITestS3AContractSeek extends AbstractContractSeekTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractCreate.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractCreate.java similarity index 92% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractCreate.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractCreate.java index e44e2b19997..502cf5ae2dd 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractCreate.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractCreate.java @@ -23,7 +23,10 @@ import org.apache.hadoop.fs.contract.AbstractContractCreateTest; import org.apache.hadoop.fs.contract.AbstractFSContract; import org.apache.hadoop.fs.contract.ContractTestUtils; -public class TestS3NContractCreate extends AbstractContractCreateTest { +/** + * S3N contract tests creating files. + */ +public class ITestS3NContractCreate extends AbstractContractCreateTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractDelete.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractDelete.java similarity index 90% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractDelete.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractDelete.java index 1b79d274838..675f979fbe2 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractDelete.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractDelete.java @@ -22,7 +22,10 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractDeleteTest; import org.apache.hadoop.fs.contract.AbstractFSContract; -public class TestS3NContractDelete extends AbstractContractDeleteTest { +/** + * S3A contract tests covering deletes. + */ +public class ITestS3NContractDelete extends AbstractContractDeleteTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractMkdir.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractMkdir.java similarity index 92% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractMkdir.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractMkdir.java index 527a31dfb67..3c566f347a7 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractMkdir.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractMkdir.java @@ -23,9 +23,9 @@ import org.apache.hadoop.fs.contract.AbstractContractMkdirTest; import org.apache.hadoop.fs.contract.AbstractFSContract; /** - * Test dir operations on S3 + * Test dir operations on S3. */ -public class TestS3NContractMkdir extends AbstractContractMkdirTest { +public class ITestS3NContractMkdir extends AbstractContractMkdirTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractOpen.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractOpen.java similarity index 91% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractOpen.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractOpen.java index 2186f28e990..7ebfc4e3cc7 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractOpen.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractOpen.java @@ -22,7 +22,10 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractOpenTest; import org.apache.hadoop.fs.contract.AbstractFSContract; -public class TestS3NContractOpen extends AbstractContractOpenTest { +/** + * S3N contract tests opening files. + */ +public class ITestS3NContractOpen extends AbstractContractOpenTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractRename.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractRename.java similarity index 90% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractRename.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractRename.java index d673416d42c..effe9eb2e67 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractRename.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractRename.java @@ -22,7 +22,10 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractRenameTest; import org.apache.hadoop.fs.contract.AbstractFSContract; -public class TestS3NContractRename extends AbstractContractRenameTest { +/** + * S3N contract tests covering rename. + */ +public class ITestS3NContractRename extends AbstractContractRenameTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractRootDir.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractRootDir.java similarity index 93% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractRootDir.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractRootDir.java index 94f8483309d..3fdf868b074 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractRootDir.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractRootDir.java @@ -23,9 +23,9 @@ import org.apache.hadoop.fs.contract.AbstractContractRootDirectoryTest; import org.apache.hadoop.fs.contract.AbstractFSContract; /** - * root dir operations against an S3 bucket + * Root dir operations against an S3 bucket. */ -public class TestS3NContractRootDir extends +public class ITestS3NContractRootDir extends AbstractContractRootDirectoryTest { @Override diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractSeek.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractSeek.java similarity index 90% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractSeek.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractSeek.java index 6d04fff013a..9e1ce730972 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/TestS3NContractSeek.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/contract/s3n/ITestS3NContractSeek.java @@ -22,7 +22,10 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractSeekTest; import org.apache.hadoop.fs.contract.AbstractFSContract; -public class TestS3NContractSeek extends AbstractContractSeekTest { +/** + * S3N contract tests covering file seek. + */ +public class ITestS3NContractSeek extends AbstractContractSeekTest { @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3/TestInMemoryS3FileSystemContract.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3/ITestInMemoryS3FileSystemContract.java similarity index 85% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3/TestInMemoryS3FileSystemContract.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3/ITestInMemoryS3FileSystemContract.java index f94c283d81c..d69858bbe13 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3/TestInMemoryS3FileSystemContract.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3/ITestInMemoryS3FileSystemContract.java @@ -20,13 +20,16 @@ package org.apache.hadoop.fs.s3; import java.io.IOException; +/** + * S3 basic contract tests through mock in-memory S3 implementation. + */ @Deprecated -public class TestInMemoryS3FileSystemContract - extends S3FileSystemContractBaseTest { +public class ITestInMemoryS3FileSystemContract + extends S3FileSystemContractBaseTest { @Override FileSystemStore getFileSystemStore() throws IOException { return new InMemoryFileSystemStore(); } - + } diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestBlockingThreadPoolExecutorService.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestBlockingThreadPoolExecutorService.java similarity index 98% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestBlockingThreadPoolExecutorService.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestBlockingThreadPoolExecutorService.java index 25a895862ea..b0b8a653ac7 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestBlockingThreadPoolExecutorService.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestBlockingThreadPoolExecutorService.java @@ -33,7 +33,7 @@ import static org.junit.Assert.assertFalse; /** * Basic unit test for S3A's blocking executor service. */ -public class TestBlockingThreadPoolExecutorService { +public class ITestBlockingThreadPoolExecutorService { private static final Logger LOG = LoggerFactory.getLogger( BlockingThreadPoolExecutorService.class); @@ -179,4 +179,4 @@ public class TestBlockingThreadPoolExecutorService { } tpe = null; } -} \ No newline at end of file +} diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AAWSCredentialsProvider.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AAWSCredentialsProvider.java similarity index 98% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AAWSCredentialsProvider.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AAWSCredentialsProvider.java index 5ba187175ac..cf8783cd34d 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AAWSCredentialsProvider.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AAWSCredentialsProvider.java @@ -48,9 +48,9 @@ import static org.junit.Assert.*; * Tests for {@link Constants#AWS_CREDENTIALS_PROVIDER} logic. * */ -public class TestS3AAWSCredentialsProvider { +public class ITestS3AAWSCredentialsProvider { private static final Logger LOG = - LoggerFactory.getLogger(TestS3AAWSCredentialsProvider.class); + LoggerFactory.getLogger(ITestS3AAWSCredentialsProvider.class); @Rule public Timeout testTimeout = new Timeout(1 * 60 * 1000); diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3ABlockingThreadPool.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ABlockingThreadPool.java similarity index 98% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3ABlockingThreadPool.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ABlockingThreadPool.java index bd738b25423..4444d0c9769 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3ABlockingThreadPool.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ABlockingThreadPool.java @@ -34,7 +34,7 @@ import org.junit.rules.Timeout; * 4th part should not trigger an exception as it would with a * non-blocking threadpool. */ -public class TestS3ABlockingThreadPool { +public class ITestS3ABlockingThreadPool { private Configuration conf; private S3AFileSystem fs; diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3ABlocksize.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ABlocksize.java similarity index 94% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3ABlocksize.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ABlocksize.java index 76fbf99c813..9a6dae75bfd 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3ABlocksize.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ABlocksize.java @@ -35,10 +35,13 @@ import static org.apache.hadoop.fs.contract.ContractTestUtils.createFile; import static org.apache.hadoop.fs.contract.ContractTestUtils.dataset; import static org.apache.hadoop.fs.contract.ContractTestUtils.fileStatsToString; -public class TestS3ABlocksize extends AbstractFSContractTestBase { +/** + * S3A tests for configuring block size. + */ +public class ITestS3ABlocksize extends AbstractFSContractTestBase { private static final Logger LOG = - LoggerFactory.getLogger(TestS3ABlocksize.class); + LoggerFactory.getLogger(ITestS3ABlocksize.class); @Override protected AbstractFSContract createContract(Configuration conf) { 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/ITestS3AConfiguration.java similarity index 97% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AConfiguration.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AConfiguration.java index 99934a55a53..9fadc1f6436 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/ITestS3AConfiguration.java @@ -50,7 +50,10 @@ import org.apache.hadoop.util.VersionInfo; import org.apache.http.HttpStatus; import org.junit.rules.TemporaryFolder; -public class TestS3AConfiguration { +/** + * S3A tests for configuration. + */ +public class ITestS3AConfiguration { private static final String EXAMPLE_ID = "AKASOMEACCESSKEY"; private static final String EXAMPLE_KEY = "RGV0cm9pdCBSZ/WQgY2xl/YW5lZCB1cAEXAMPLE"; @@ -59,7 +62,7 @@ public class TestS3AConfiguration { private S3AFileSystem fs; private static final Logger LOG = - LoggerFactory.getLogger(TestS3AConfiguration.class); + LoggerFactory.getLogger(ITestS3AConfiguration.class); private static final String TEST_ENDPOINT = "test.fs.s3a.endpoint"; @@ -349,7 +352,8 @@ public class TestS3AConfiguration { } @Test - public void shouldBeAbleToSwitchOnS3PathStyleAccessViaConfigProperty() throws Exception { + public void shouldBeAbleToSwitchOnS3PathStyleAccessViaConfigProperty() + throws Exception { conf = new Configuration(); conf.set(Constants.PATH_STYLE_ACCESS, Boolean.toString(true)); @@ -365,7 +369,9 @@ public class TestS3AConfiguration { assertTrue("Expected to find path style access to be switched on!", clientOptions.isPathStyleAccess()); byte[] file = ContractTestUtils.toAsciiByteArray("test file"); - ContractTestUtils.writeAndRead(fs, new Path("/path/style/access/testFile"), file, file.length, conf.getInt(Constants.FS_S3A_BLOCK_SIZE, file.length), false, true); + ContractTestUtils.writeAndRead(fs, + new Path("/path/style/access/testFile"), file, file.length, + conf.getInt(Constants.FS_S3A_BLOCK_SIZE, file.length), false, true); } catch (final AWSS3IOException e) { LOG.error("Caught exception: ", e); // Catch/pass standard path style access behaviour when live bucket diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3ACredentialsInURL.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ACredentialsInURL.java similarity index 97% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3ACredentialsInURL.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ACredentialsInURL.java index 8cb7c0f0b1a..b3d7abfff32 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3ACredentialsInURL.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ACredentialsInURL.java @@ -43,10 +43,10 @@ import static org.apache.hadoop.fs.s3a.S3ATestConstants.TEST_FS_S3A_NAME; * set, and a check that an invalid set do at least get stripped out * of the final URI */ -public class TestS3ACredentialsInURL extends Assert { +public class ITestS3ACredentialsInURL extends Assert { private S3AFileSystem fs; private static final Logger LOG = - LoggerFactory.getLogger(TestS3ACredentialsInURL.class); + LoggerFactory.getLogger(ITestS3ACredentialsInURL.class); @Rule public Timeout testTimeout = new Timeout(30 * 60 * 1000); @@ -109,7 +109,7 @@ public class TestS3ACredentialsInURL extends Assert { fail(text + " Test failed"); } } - + /** * Set up some invalid credentials, verify login is rejected. * @throws Throwable diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AEncryption.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEncryption.java similarity index 98% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AEncryption.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEncryption.java index 43a26ff2495..454327893f5 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AEncryption.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEncryption.java @@ -35,7 +35,7 @@ import static org.apache.hadoop.fs.s3a.S3ATestUtils.*; * are made for different file sizes as there have been reports that the * file length may be rounded up to match word boundaries. */ -public class TestS3AEncryption extends AbstractS3ATestBase { +public class ITestS3AEncryption extends AbstractS3ATestBase { private static final String AES256 = Constants.SERVER_SIDE_ENCRYPTION_AES256; @Override diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AEncryptionAlgorithmPropagation.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEncryptionAlgorithmPropagation.java similarity index 96% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AEncryptionAlgorithmPropagation.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEncryptionAlgorithmPropagation.java index 04ca8304e0c..81578c202e8 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AEncryptionAlgorithmPropagation.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEncryptionAlgorithmPropagation.java @@ -31,7 +31,8 @@ import static org.apache.hadoop.fs.s3a.S3ATestUtils.*; * Test whether or not encryption settings propagate by choosing an invalid * one. We expect the write to fail with a 400 bad request error */ -public class TestS3AEncryptionAlgorithmPropagation extends AbstractS3ATestBase { +public class ITestS3AEncryptionAlgorithmPropagation + extends AbstractS3ATestBase { @Override protected Configuration createConfiguration() { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AEncryptionFastOutputStream.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEncryptionFastOutputStream.java similarity index 94% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AEncryptionFastOutputStream.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEncryptionFastOutputStream.java index 1fa8486b5df..c06fed1a8f2 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AEncryptionFastOutputStream.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AEncryptionFastOutputStream.java @@ -24,7 +24,7 @@ import org.apache.hadoop.conf.Configuration; * Run the encryption tests against the Fast output stream. * This verifies that both file writing paths can encrypt their data. */ -public class TestS3AEncryptionFastOutputStream extends TestS3AEncryption { +public class ITestS3AEncryptionFastOutputStream extends ITestS3AEncryption { @Override protected Configuration createConfiguration() { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AFailureHandling.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFailureHandling.java similarity index 95% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AFailureHandling.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFailureHandling.java index 83337f041c3..06864881e38 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AFailureHandling.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFailureHandling.java @@ -21,7 +21,6 @@ package org.apache.hadoop.fs.s3a; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.InvalidRequestException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.contract.AbstractFSContract; import org.apache.hadoop.fs.contract.AbstractFSContractTestBase; @@ -33,7 +32,6 @@ import org.slf4j.LoggerFactory; import java.io.EOFException; import java.io.FileNotFoundException; import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; import static org.apache.hadoop.fs.contract.ContractTestUtils.*; import static org.apache.hadoop.fs.s3a.S3ATestUtils.*; @@ -43,9 +41,9 @@ import static org.apache.hadoop.fs.s3a.S3AUtils.*; * Test S3A Failure translation, including a functional test * generating errors during stream IO. */ -public class TestS3AFailureHandling extends AbstractFSContractTestBase { +public class ITestS3AFailureHandling extends AbstractFSContractTestBase { private static final Logger LOG = - LoggerFactory.getLogger(TestS3AFailureHandling.class); + LoggerFactory.getLogger(ITestS3AFailureHandling.class); @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AFastOutputStream.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFastOutputStream.java similarity index 98% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AFastOutputStream.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFastOutputStream.java index e507cf6cf7b..b5fa1c36150 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AFastOutputStream.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFastOutputStream.java @@ -34,7 +34,7 @@ import java.io.IOException; * Tests regular and multi-part upload functionality for S3AFastOutputStream. * File sizes are kept small to reduce test duration on slow connections */ -public class TestS3AFastOutputStream { +public class ITestS3AFastOutputStream { private FileSystem fs; diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AFileOperationCost.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileOperationCost.java similarity index 98% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AFileOperationCost.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileOperationCost.java index 179eb88a55e..4dcd836c17c 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AFileOperationCost.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileOperationCost.java @@ -42,13 +42,13 @@ import static org.apache.hadoop.fs.s3a.S3ATestUtils.MetricDiff; * Use metrics to assert about the cost of file status queries. * {@link S3AFileSystem#getFileStatus(Path)}. */ -public class TestS3AFileOperationCost extends AbstractFSContractTestBase { +public class ITestS3AFileOperationCost extends AbstractFSContractTestBase { private MetricDiff metadataRequests; private MetricDiff listRequests; private static final Logger LOG = - LoggerFactory.getLogger(TestS3AFileOperationCost.class); + LoggerFactory.getLogger(ITestS3AFileOperationCost.class); @Override protected AbstractFSContract createContract(Configuration conf) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AFileSystemContract.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileSystemContract.java similarity index 94% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AFileSystemContract.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileSystemContract.java index 6315a80c561..858ac22c7f2 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AFileSystemContract.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileSystemContract.java @@ -33,10 +33,10 @@ import org.apache.hadoop.fs.Path; * properly making it impossible to skip the tests if we don't have a valid * bucket. **/ -public class TestS3AFileSystemContract extends FileSystemContractBaseTest { +public class ITestS3AFileSystemContract extends FileSystemContractBaseTest { protected static final Logger LOG = - LoggerFactory.getLogger(TestS3AFileSystemContract.class); + LoggerFactory.getLogger(ITestS3AFileSystemContract.class); @Override public void setUp() throws Exception { @@ -61,7 +61,9 @@ public class TestS3AFileSystemContract extends FileSystemContractBaseTest { @Override public void testRenameFileAsExistingFile() throws Exception { - if (!renameSupported()) return; + if (!renameSupported()) { + return; + } Path src = path("/test/hadoop/file"); createFile(src); diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3ATemporaryCredentials.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ATemporaryCredentials.java similarity index 97% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3ATemporaryCredentials.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ATemporaryCredentials.java index 957dfb9e38d..360a151406a 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3ATemporaryCredentials.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ATemporaryCredentials.java @@ -48,12 +48,12 @@ import static org.apache.hadoop.fs.s3a.Constants.*; * should only be used against transient filesystems where you don't care about * the data. */ -public class TestS3ATemporaryCredentials extends AbstractFSContractTestBase { +public class ITestS3ATemporaryCredentials extends AbstractFSContractTestBase { public static final String TEST_STS_ENABLED = "test.fs.s3a.sts.enabled"; public static final String TEST_STS_ENDPOINT = "test.fs.s3a.sts.endpoint"; private static final Logger LOG = - LoggerFactory.getLogger(TestS3ATemporaryCredentials.class); + LoggerFactory.getLogger(ITestS3ATemporaryCredentials.class); private static final String PROVIDER_CLASS = TemporaryAWSCredentialsProvider.NAME; diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContext.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContext.java similarity index 86% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContext.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContext.java index 34d78a5d265..7e4273a4c70 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContext.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContext.java @@ -16,8 +16,8 @@ package org.apache.hadoop.fs.s3a.fileContext; import org.apache.hadoop.fs.TestFileContext; /** - * Implementation of TestFileContext for S3a + * Implementation of TestFileContext for S3a. */ -public class TestS3AFileContext extends TestFileContext{ +public class ITestS3AFileContext extends TestFileContext{ } diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextCreateMkdir.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextCreateMkdir.java similarity index 90% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextCreateMkdir.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextCreateMkdir.java index b0c4d8424f9..4b8d4bb5b32 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextCreateMkdir.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextCreateMkdir.java @@ -20,9 +20,9 @@ import org.apache.hadoop.fs.s3a.S3ATestUtils; import org.junit.Before; /** - * Extends FileContextCreateMkdirBaseTest for a S3a FileContext + * Extends FileContextCreateMkdirBaseTest for a S3a FileContext. */ -public class TestS3AFileContextCreateMkdir +public class ITestS3AFileContextCreateMkdir extends FileContextCreateMkdirBaseTest { @Before diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextMainOperations.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextMainOperations.java similarity index 93% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextMainOperations.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextMainOperations.java index 4d200d14e23..7247c168c64 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextMainOperations.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextMainOperations.java @@ -22,9 +22,9 @@ import org.junit.Ignore; import org.junit.Test; /** - * S3A implementation of FileContextMainOperationsBaseTest + * S3A implementation of FileContextMainOperationsBaseTest. */ -public class TestS3AFileContextMainOperations +public class ITestS3AFileContextMainOperations extends FileContextMainOperationsBaseTest { @Before diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextStatistics.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextStatistics.java similarity index 88% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextStatistics.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextStatistics.java index a9f48483679..5e88aba615f 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextStatistics.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextStatistics.java @@ -24,15 +24,16 @@ import org.junit.Assert; import org.junit.Before; /** - * S3a implementation of FCStatisticsBaseTest + * S3a implementation of FCStatisticsBaseTest. */ -public class TestS3AFileContextStatistics extends FCStatisticsBaseTest { +public class ITestS3AFileContextStatistics extends FCStatisticsBaseTest { @Before public void setUp() throws Exception { Configuration conf = new Configuration(); fc = S3ATestUtils.createTestFileContext(conf); - fc.mkdir(fileContextTestHelper.getTestRootPath(fc, "test"), FileContext.DEFAULT_PERM, true); + fc.mkdir(fileContextTestHelper.getTestRootPath(fc, "test"), + FileContext.DEFAULT_PERM, true); } @After diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextURI.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextURI.java similarity index 85% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextURI.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextURI.java index 3da7b19a84a..fff1fcb9f58 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextURI.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextURI.java @@ -22,9 +22,9 @@ import org.junit.Ignore; import org.junit.Test; /** - * S3a implementation of FileContextURIBase + * S3a implementation of FileContextURIBase. */ -public class TestS3AFileContextURI extends FileContextURIBase { +public class ITestS3AFileContextURI extends FileContextURIBase { @Before public void setUp() throws IOException, Exception { @@ -37,7 +37,8 @@ public class TestS3AFileContextURI extends FileContextURIBase { @Test @Ignore public void testFileStatus() throws IOException { - //test disabled (the statistics tested with this method are not relevant for an S3FS) + // test disabled + // (the statistics tested with this method are not relevant for an S3FS) } } diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextUtil.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextUtil.java similarity index 89% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextUtil.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextUtil.java index 666f4c292a9..d0312ba083b 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/TestS3AFileContextUtil.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/fileContext/ITestS3AFileContextUtil.java @@ -20,9 +20,9 @@ import org.apache.hadoop.fs.s3a.S3ATestUtils; import org.junit.Before; /** - * S3A implementation of FileContextUtilBase + * S3A implementation of FileContextUtilBase. */ -public class TestS3AFileContextUtil extends FileContextUtilBase { +public class ITestS3AFileContextUtil extends FileContextUtilBase { @Before public void setUp() throws IOException, Exception { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADeleteFilesOneByOne.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ITestS3ADeleteFilesOneByOne.java similarity index 89% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADeleteFilesOneByOne.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ITestS3ADeleteFilesOneByOne.java index 77c85a91388..a375664a50a 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADeleteFilesOneByOne.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ITestS3ADeleteFilesOneByOne.java @@ -24,7 +24,10 @@ import org.junit.Test; import java.io.IOException; -public class TestS3ADeleteFilesOneByOne extends TestS3ADeleteManyFiles { +/** + * Tests file deletion with multi-delete disabled. + */ +public class ITestS3ADeleteFilesOneByOne extends ITestS3ADeleteManyFiles { @Override protected Configuration createConfiguration() { @@ -33,6 +36,7 @@ public class TestS3ADeleteFilesOneByOne extends TestS3ADeleteManyFiles { return configuration; } + @Override @Test public void testOpenCreate() throws IOException { 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/ITestS3ADeleteManyFiles.java similarity index 97% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADeleteManyFiles.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ITestS3ADeleteManyFiles.java index bb2cf04facf..542dc12e6d3 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/ITestS3ADeleteManyFiles.java @@ -35,9 +35,9 @@ import java.util.concurrent.Future; /** * Test some scalable operations related to file renaming and deletion. */ -public class TestS3ADeleteManyFiles extends S3AScaleTestBase { +public class ITestS3ADeleteManyFiles extends S3AScaleTestBase { private static final Logger LOG = - LoggerFactory.getLogger(TestS3ADeleteManyFiles.class); + LoggerFactory.getLogger(ITestS3ADeleteManyFiles.class); @Test public void testBulkRenameAndDelete() throws Throwable { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADirectoryPerformance.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ITestS3ADirectoryPerformance.java similarity index 98% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADirectoryPerformance.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ITestS3ADirectoryPerformance.java index 35ea3add55a..b5f4eb3cc83 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADirectoryPerformance.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ITestS3ADirectoryPerformance.java @@ -33,9 +33,9 @@ import static org.apache.hadoop.fs.contract.ContractTestUtils.*; /** * Test the performance of listing files/directories. */ -public class TestS3ADirectoryPerformance extends S3AScaleTestBase { +public class ITestS3ADirectoryPerformance extends S3AScaleTestBase { private static final Logger LOG = LoggerFactory.getLogger( - TestS3ADirectoryPerformance.class); + ITestS3ADirectoryPerformance.class); @Test public void testListOperations() throws Throwable { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3AInputStreamPerformance.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ITestS3AInputStreamPerformance.java similarity index 99% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3AInputStreamPerformance.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ITestS3AInputStreamPerformance.java index d6d9d66745b..e2163c5da94 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3AInputStreamPerformance.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ITestS3AInputStreamPerformance.java @@ -50,9 +50,9 @@ import static org.apache.hadoop.fs.s3a.Constants.*; /** * Look at the performance of S3a operations. */ -public class TestS3AInputStreamPerformance extends S3AScaleTestBase { +public class ITestS3AInputStreamPerformance extends S3AScaleTestBase { private static final Logger LOG = LoggerFactory.getLogger( - TestS3AInputStreamPerformance.class); + ITestS3AInputStreamPerformance.class); private S3AFileSystem s3aFS; private Path testData; @@ -223,7 +223,7 @@ public class TestS3AInputStreamPerformance extends S3AScaleTestBase { int reads = 0; while (remaining > 0) { int bytesRead = in.read(block, offset, remaining); - reads ++; + reads++; if (bytesRead == 1) { break; } @@ -233,7 +233,7 @@ public class TestS3AInputStreamPerformance extends S3AScaleTestBase { } blockTimer.end("Reading block %d in %d reads", i, reads); } - timer2.end("Time to read %d bytes in %d blocks", len, blockCount ); + timer2.end("Time to read %d bytes in %d blocks", len, blockCount); bandwidth(timer2, count); logStreamStatistics(); } diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/TestS3A.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/ITestS3A.java similarity index 94% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/TestS3A.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/ITestS3A.java index a22dd283c98..ca57da65f3c 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/TestS3A.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/ITestS3A.java @@ -36,7 +36,10 @@ import org.apache.hadoop.fs.s3a.S3ATestUtils; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -public class TestS3A { +/** + * S3A tests through the {@link FileContext} API. + */ +public class ITestS3A { private FileContext fc; @Rule @@ -75,7 +78,7 @@ public class TestS3A { @Test public void testS3ACreateFileInSubDir() throws Exception { Path dirPath = getTestPath(); - fc.mkdir(dirPath,FileContext.DIR_DEFAULT_PERM,true); + fc.mkdir(dirPath, FileContext.DIR_DEFAULT_PERM, true); Path filePath = new Path(dirPath, "file"); try (FSDataOutputStream file = fc.create(filePath, EnumSet.of(CreateFlag .CREATE))) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/TestS3AMiniYarnCluster.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/ITestS3AMiniYarnCluster.java similarity index 96% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/TestS3AMiniYarnCluster.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/ITestS3AMiniYarnCluster.java index 990d79f2054..772d8c7fd0b 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/TestS3AMiniYarnCluster.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/yarn/ITestS3AMiniYarnCluster.java @@ -45,7 +45,10 @@ import org.junit.Before; import org.junit.Test; import static org.junit.Assert.assertEquals; -public class TestS3AMiniYarnCluster { +/** + * Tests that S3A is usable through a YARN application. + */ +public class ITestS3AMiniYarnCluster { private final Configuration conf = new YarnConfiguration(); private S3AFileSystem fs; @@ -105,9 +108,10 @@ public class TestS3AMiniYarnCluster { } /** - * helper method + * helper method. */ - private Map getResultAsMap(String outputAsStr) throws IOException { + private Map getResultAsMap(String outputAsStr) + throws IOException { Map result = new HashMap<>(); for (String line : outputAsStr.split("\n")) { String[] tokens = line.split("\t"); @@ -117,7 +121,7 @@ public class TestS3AMiniYarnCluster { } /** - * helper method + * helper method. */ private void writeStringToFile(Path path, String string) throws IOException { FileContext fc = S3ATestUtils.createTestFileContext(conf); @@ -128,7 +132,7 @@ public class TestS3AMiniYarnCluster { } /** - * helper method + * helper method. */ private String readStringFromFile(Path path) { try (FSDataInputStream in = fs.open(path)) { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/TestInMemoryNativeS3FileSystemContract.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/ITestInMemoryNativeS3FileSystemContract.java similarity index 84% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/TestInMemoryNativeS3FileSystemContract.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/ITestInMemoryNativeS3FileSystemContract.java index 664d39e6f4f..adbf95074e8 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/TestInMemoryNativeS3FileSystemContract.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/ITestInMemoryNativeS3FileSystemContract.java @@ -20,8 +20,11 @@ package org.apache.hadoop.fs.s3native; import java.io.IOException; -public class TestInMemoryNativeS3FileSystemContract - extends NativeS3FileSystemContractBaseTest { +/** + * S3N basic contract tests through mock in-memory S3 implementation. + */ +public class ITestInMemoryNativeS3FileSystemContract + extends NativeS3FileSystemContractBaseTest { @Override NativeFileSystemStore getNativeFileSystemStore() throws IOException { diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/TestJets3tNativeFileSystemStore.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/ITestJets3tNativeFileSystemStore.java similarity index 96% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/TestJets3tNativeFileSystemStore.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/ITestJets3tNativeFileSystemStore.java index dbd476e4ecf..cfe622c5785 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/TestJets3tNativeFileSystemStore.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/ITestJets3tNativeFileSystemStore.java @@ -40,8 +40,10 @@ import java.security.DigestOutputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; - -public class TestJets3tNativeFileSystemStore { +/** + * S3N tests through live S3 service. + */ +public class ITestJets3tNativeFileSystemStore { private Configuration conf; private Jets3tNativeFileSystemStore store; private NativeS3FileSystem fs; @@ -98,7 +100,9 @@ public class TestJets3tNativeFileSystemStore { InputStream in = new BufferedInputStream( new DigestInputStream(fs.open(copyPath), digest2)); long copyLen = 0; - while (in.read() != -1) {copyLen++;} + while (in.read() != -1) { + copyLen++; + } in.close(); assertEquals("Copy length matches original", len, copyLen); diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/TestJets3tNativeS3FileSystemContract.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/ITestJets3tNativeS3FileSystemContract.java similarity index 86% rename from hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/TestJets3tNativeS3FileSystemContract.java rename to hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/ITestJets3tNativeS3FileSystemContract.java index 42d6f06d7ab..e51eaf65014 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/TestJets3tNativeS3FileSystemContract.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3native/ITestJets3tNativeS3FileSystemContract.java @@ -20,8 +20,11 @@ package org.apache.hadoop.fs.s3native; import java.io.IOException; -public class TestJets3tNativeS3FileSystemContract - extends NativeS3FileSystemContractBaseTest { +/** + * S3N basic contract tests through live S3 service. + */ +public class ITestJets3tNativeS3FileSystemContract + extends NativeS3FileSystemContractBaseTest { @Override NativeFileSystemStore getNativeFileSystemStore() throws IOException {