Fixed build failure in Bamboo as a result of r109490.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@109515 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2015-08-04 10:36:39 +00:00
parent 2d21700775
commit f29c220c43

View File

@@ -311,17 +311,28 @@ public class CustomModelServiceImplTest
testUser.put(ContentModel.PROP_LASTNAME, "Doe");
testUser.put(ContentModel.PROP_PASSWORD, "password");
transactionHelper.doInTransaction(new RetryingTransactionCallback<Void>()
final NodeRef personNodeRef = transactionHelper.doInTransaction(new RetryingTransactionCallback<NodeRef>()
{
public Void execute() throws Exception
public NodeRef execute() throws Exception
{
personService.createPerson(testUser);
NodeRef nodeRef = personService.createPerson(testUser);
assertNotNull(nodeRef);
assertFalse(customModelService.isModelAdmin(userName));
// Add the user to the group
authorityService.addAuthority(CustomModelServiceImpl.GROUP_ALFRESCO_MODEL_ADMINISTRATORS_AUTHORITY, userName);
assertTrue(customModelService.isModelAdmin(userName));
return nodeRef;
}
});
// Cleanup
transactionHelper.doInTransaction(new RetryingTransactionCallback<Void>()
{
public Void execute() throws Exception
{
personService.deletePerson(personNodeRef);
return null;
}
});