Skip to content

Commit

Permalink
add some comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
007DXR committed Jul 10, 2023
1 parent 1161f0f commit 09dc650
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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")
Expand Down Expand Up @@ -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()
Expand All @@ -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");
}

Expand All @@ -108,6 +101,9 @@ public void after() {
mS3Client = null;
}

/**
* Creates a bucket.
*/
@Test
public void createBucket() throws Exception {
String bucketName = "bucket";
Expand All @@ -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";
Expand Down

0 comments on commit 09dc650

Please sign in to comment.