diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOzoneManagerSnapshotAcl.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOzoneManagerSnapshotAcl.java index d73eecbb3883..b2074b49fe09 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOzoneManagerSnapshotAcl.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOzoneManagerSnapshotAcl.java @@ -49,9 +49,7 @@ import org.apache.hadoop.ozone.security.acl.OzoneObj; import org.apache.hadoop.ozone.security.acl.OzoneObjInfo; import org.apache.hadoop.security.UserGroupInformation; -import org.apache.ozone.test.tag.Flaky; import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Timeout; @@ -74,7 +72,6 @@ * Test for Snapshot feature with ACL. */ @Timeout(value = 300) -@Flaky("HDDS-8433") public class TestOzoneManagerSnapshotAcl { private static final String ADMIN_USER = "om"; @@ -109,7 +106,7 @@ public static void init() throws Exception { conf.setBoolean(OZONE_ACL_ENABLED, true); conf.set(OZONE_ACL_AUTHORIZER_CLASS, OZONE_ACL_AUTHORIZER_CLASS_NATIVE); final String omServiceId = "om-service-test-1" - + RandomStringUtils.randomNumeric(5); + + RandomStringUtils.randomNumeric(32); cluster = MiniOzoneCluster.newOMHABuilder(conf) .setClusterId(UUID.randomUUID().toString()) @@ -139,11 +136,6 @@ public static void init() throws Exception { OMStorage.getOmDbDir(ozoneManagerConf); } - @AfterEach - public void cleanup() throws IOException { - setDefaultAcls(); - } - @AfterAll public static void tearDown() throws Exception { IOUtils.closeQuietly(client); @@ -458,7 +450,7 @@ private void setKeyAcl() throws IOException { private void createKey(OzoneBucket bucket) throws IOException { - keyName = KEY_PREFIX + RandomStringUtils.randomNumeric(5); + keyName = KEY_PREFIX + RandomStringUtils.randomNumeric(32); byte[] data = RandomStringUtils.randomAscii(1).getBytes(UTF_8); final OzoneOutputStream fileKey = bucket.createKey(keyName, data.length); fileKey.write(data); @@ -469,7 +461,7 @@ private void createSnapshot() throws IOException { final String snapshotPrefix = "snapshot-"; final String snapshotName = - snapshotPrefix + RandomStringUtils.randomNumeric(5); + snapshotPrefix + RandomStringUtils.randomNumeric(32); objectStore.createSnapshot(volumeName, bucketName, snapshotName); snapshotKeyPrefix = OmSnapshotManager .getSnapshotPrefix(snapshotName); @@ -527,7 +519,7 @@ private OmKeyArgs getOmKeyArgs(boolean isSnapshot) { private void createBucket(BucketLayout bucketLayout, OzoneVolume volume) throws IOException { final String bucketPrefix = "bucket-"; - bucketName = bucketPrefix + RandomStringUtils.randomNumeric(5); + bucketName = bucketPrefix + RandomStringUtils.randomNumeric(32); final BucketArgs bucketArgs = BucketArgs.newBuilder() .setOwner(ADMIN) .setBucketLayout(bucketLayout).build(); @@ -536,7 +528,7 @@ private void createBucket(BucketLayout bucketLayout, private void createVolume() throws IOException { final String volumePrefix = "volume-"; - volumeName = volumePrefix + RandomStringUtils.randomNumeric(5); + volumeName = volumePrefix + RandomStringUtils.randomNumeric(32); final VolumeArgs volumeArgs = new VolumeArgs.Builder() .setAdmin(ADMIN) .setOwner(ADMIN)