Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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";
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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();
Expand All @@ -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)
Expand Down