kaijchen commented on code in PR #4396:
URL: https://github.com/apache/ozone/pull/4396#discussion_r1135390532
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestKeyManagerImpl.java:
##########
@@ -562,56 +557,60 @@ public void testPrefixAclOps() throws IOException {
writeClient.setAcl(ozPrefix1, acls);
ozAclGet = writeClient.getAcl(ozPrefix1);
- Assert.assertEquals(2, ozAclGet.size());
+ assertEquals(2, ozAclGet.size());
int matchEntries = 0;
for (OzoneAcl acl : ozAclGet) {
if (acl.getType() == ACLIdentityType.GROUP) {
- Assert.assertEquals(ozAcl3, acl);
+ assertEquals(ozAcl3, acl);
matchEntries++;
}
if (acl.getType() == ACLIdentityType.USER) {
- Assert.assertEquals(ozAcl2, acl);
+ assertEquals(ozAcl2, acl);
matchEntries++;
}
}
- Assert.assertEquals(2, matchEntries);
+ assertEquals(2, matchEntries);
boolean result = writeClient.removeAcl(ozPrefix1, ozAcl4);
- Assert.assertEquals(true, result);
+ assertEquals(true, result);
ozAclGet = writeClient.getAcl(ozPrefix1);
- Assert.assertEquals(2, ozAclGet.size());
+ assertEquals(2, ozAclGet.size());
result = writeClient.removeAcl(ozPrefix1, ozAcl3);
- Assert.assertEquals(true, result);
+ assertEquals(true, result);
ozAclGet = writeClient.getAcl(ozPrefix1);
- Assert.assertEquals(1, ozAclGet.size());
+ assertEquals(1, ozAclGet.size());
- Assert.assertEquals(ozAcl2, ozAclGet.get(0));
+ assertEquals(ozAcl2, ozAclGet.get(0));
// add dev:w
writeClient.addAcl(ozPrefix1, ozAcl4);
ozAclGet = writeClient.getAcl(ozPrefix1);
- Assert.assertEquals(2, ozAclGet.size());
+ assertEquals(2, ozAclGet.size());
// add dev:r and validate the acl bitset combined
writeClient.addAcl(ozPrefix1, ozAcl5);
ozAclGet = writeClient.getAcl(ozPrefix1);
- Assert.assertEquals(2, ozAclGet.size());
+ assertEquals(2, ozAclGet.size());
matchEntries = 0;
for (OzoneAcl acl : ozAclGet) {
if (acl.getType() == ACLIdentityType.GROUP) {
- Assert.assertEquals(ozAcl3, acl);
+ assertEquals(ozAcl3, acl);
matchEntries++;
}
if (acl.getType() == ACLIdentityType.USER) {
- Assert.assertEquals(ozAcl2, acl);
+ assertEquals(ozAcl2, acl);
matchEntries++;
}
}
- Assert.assertEquals(2, matchEntries);
+ assertEquals(2, matchEntries);
+ // cleanup
Review Comment:
The cleanup is borrowed from
https://github.com/apache/ozone/pull/3653/files#diff-4275d85bf442cb352596248ced7651fcd5e3b09876bb6d2d80464cdf628a23fdR614
Without it, the assertion fails `expected=1, actual=3` at
https://github.com/apache/ozone/pull/4396/files#diff-4275d85bf442cb352596248ced7651fcd5e3b09876bb6d2d80464cdf628a23fdR650
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]