bharatviswa504 commented on a change in pull request #1225: HDDS-1909. Use new
HA code for Non-HA in OM.
URL: https://github.com/apache/hadoop/pull/1225#discussion_r319620120
##########
File path:
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestS3BucketManager.java
##########
@@ -135,29 +99,17 @@ public void testGetS3BucketMapping() throws IOException {
public void testGetOzoneNames() throws IOException {
S3BucketManager s3BucketManager = new S3BucketManagerImpl(conf, metaMgr,
volumeManager, bucketManager);
- s3BucketManager.createOzoneVolumeIfNeeded("batman");
- s3BucketManager.createS3Bucket("batman", "gotham");
- String volumeName = s3BucketManager.getOzoneVolumeName("gotham");
- Assert.assertTrue(volumeName.equalsIgnoreCase("s3batman"));
- String bucketName =s3BucketManager.getOzoneBucketName("gotham");
- Assert.assertTrue(bucketName.equalsIgnoreCase("gotham"));
+ String userName = "batman";
+ String s3BucketName = "gotham";
+ metaMgr.getS3Table().put(s3BucketName,
+ s3BucketManager.formatOzoneVolumeName(userName) + "/" + s3BucketName);
+ String volumeName = s3BucketManager.getOzoneVolumeName(s3BucketName);
+ Assert.assertTrue(volumeName.equalsIgnoreCase("s3"+userName));
+ String bucketName =s3BucketManager.getOzoneBucketName(s3BucketName);
+ Assert.assertTrue(bucketName.equalsIgnoreCase(s3BucketName));
// try to get a bucket that does not exist.
thrown.expectMessage("No such S3 bucket.");
s3BucketManager.getOzoneBucketMapping("raven");
}
-
- @Test
- /**
- * This tests makes sure bucket names are unique across users.
- */
- public void testBucketNameAreUnique() throws IOException {
Review comment:
Same as above this code path will not be used and also there are tests added
in TestS3BucketCreateRequest.java
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]