From 53729279c7ee6ff8cf0ee69089c18d84417a4a7f Mon Sep 17 00:00:00 2001 From: Bharat Viswanadham Date: Wed, 30 Jan 2019 16:21:42 -0800 Subject: [PATCH] HDDS-1035. Intermittent TestRootList failure. Contributed by Doroszlai Attila. --- .../org/apache/hadoop/ozone/s3/endpoint/TestRootList.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/endpoint/TestRootList.java b/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/endpoint/TestRootList.java index 4f760675d8..8759fff0d0 100644 --- a/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/endpoint/TestRootList.java +++ b/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/endpoint/TestRootList.java @@ -24,7 +24,6 @@ import org.apache.hadoop.ozone.client.OzoneClientStub; import org.apache.hadoop.ozone.s3.header.AuthenticationHeaderParser; -import org.apache.commons.lang3.RandomStringUtils; import static org.junit.Assert.assertEquals; import org.junit.Before; import org.junit.Test; @@ -58,14 +57,13 @@ public void setup() throws Exception { @Test public void testListBucket() throws Exception { - // List operation should success even there is no bucket. + // List operation should succeed even there is no bucket. ListBucketResponse response = rootEndpoint.get(); assertEquals(0, response.getBucketsNum()); - String bucketBaseName = "bucket-"; + String bucketBaseName = "bucket-" + getClass().getName(); for(int i = 0; i < 10; i++) { - objectStoreStub.createS3Bucket(userName, - bucketBaseName + RandomStringUtils.randomNumeric(3)); + objectStoreStub.createS3Bucket(userName, bucketBaseName + i); } response = rootEndpoint.get(); assertEquals(10, response.getBucketsNum());