SEC-670: Deadlock avoidance.

This commit is contained in:
Ben Alex
2008-04-05 22:49:37 +00:00
parent 64442b6645
commit 8a7bfafce9
2 changed files with 37 additions and 51 deletions

View File

@@ -326,21 +326,6 @@ public class JdbcAclServiceTests extends AbstractTransactionalDataSourceSpringCo
}
}
public void testDeleteAllAclsRemovesAclClassRecord() throws Exception {
Authentication auth = new TestingAuthenticationToken("ben", "ignored",
new GrantedAuthority[] {new GrantedAuthorityImpl("ROLE_ADMINISTRATOR")});
auth.setAuthenticated(true);
SecurityContextHolder.getContext().setAuthentication(auth);
ObjectIdentity topParentOid = new ObjectIdentityImpl("org.springframework.security.TargetObject", new Long(100));
// Remove all acls associated with a certain class type
jdbcMutableAclService.deleteAcl(topParentOid, true);
// Check the acl_class table is empty
assertEquals(0, getJdbcTemplate().queryForList(SELECT_ALL_CLASSES, new Object[] {"org.springframework.security.TargetObject"} ).size());
}
public void testDeleteAclRemovesRowsFromDatabase() throws Exception {
Authentication auth = new TestingAuthenticationToken("ben", "ignored",
new GrantedAuthority[] {new GrantedAuthorityImpl("ROLE_ADMINISTRATOR")});