From 09dc650d0c53930773e46ba9d1a89b0129e7ac92 Mon Sep 17 00:00:00 2001 From: 007DXR <1941391270@qq.com> Date: Mon, 10 Jul 2023 16:05:44 +0800 Subject: [PATCH] add some comments. --- .../alluxio/client/rest/CreateBucketTest.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/dora/tests/src/test/java/alluxio/client/rest/CreateBucketTest.java b/dora/tests/src/test/java/alluxio/client/rest/CreateBucketTest.java index 9d90f4c36950..0e7a011debb1 100644 --- a/dora/tests/src/test/java/alluxio/client/rest/CreateBucketTest.java +++ b/dora/tests/src/test/java/alluxio/client/rest/CreateBucketTest.java @@ -13,7 +13,6 @@ import alluxio.Constants; import alluxio.client.WriteType; -import alluxio.client.file.FileSystem; import alluxio.conf.PropertyKey; import alluxio.master.journal.JournalType; import alluxio.proxy.s3.S3Error; @@ -40,6 +39,8 @@ public class CreateBucketTest extends RestApiTest { + private static final String TEST_BUCKET = "test-bucket"; + private AmazonS3 mS3Client = null; @Rule public S3ProxyRule mS3Proxy = S3ProxyRule.builder() .withBlobStoreProvider("transient") @@ -75,15 +76,9 @@ public class CreateBucketTest extends RestApiTest { .setStartCluster(false) .build(); - private static final String TEST_BUCKET = "test-bucket"; - - private FileSystem mFileSystem = null; - private AmazonS3 mS3Client = null; - @Before public void before() throws Exception { mLocalAlluxioClusterResource.start(); - mFileSystem = mLocalAlluxioClusterResource.get().getClient(); mS3Client = AmazonS3ClientBuilder .standard() @@ -96,10 +91,8 @@ public void before() throws Exception { Regions.US_WEST_2.getName())) .build(); mS3Client.createBucket(TEST_BUCKET); - mFileSystem = mLocalAlluxioClusterResource.get().getClient(); mHostname = mLocalAlluxioClusterResource.get().getHostname(); mPort = mLocalAlluxioClusterResource.get().getProxyProcess().getWebLocalPort(); - mFileSystem = mLocalAlluxioClusterResource.get().getClient(); mBaseUri = String.format("/api/v1/s3"); } @@ -108,6 +101,9 @@ public void after() { mS3Client = null; } + /** + * Creates a bucket. + */ @Test public void createBucket() throws Exception { String bucketName = "bucket"; @@ -118,6 +114,9 @@ public void createBucket() throws Exception { headBucketRestCall(bucketName).getResponseCode()); } + /** + * Creates an existent bucket. + */ @Test public void createExistentBucket() throws Exception { String bucketName = "bucket";