mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM: Modificaiton to unit test to see if issue seen only on Bamboo can be worked around.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@49383 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -65,8 +65,11 @@ public class CreateRecordActionTest extends BaseRMTestCase
|
|||||||
{
|
{
|
||||||
// Testing
|
// Testing
|
||||||
AuthorityDAO authDao = (AuthorityDAO)applicationContext.getBean("authorityDAO");
|
AuthorityDAO authDao = (AuthorityDAO)applicationContext.getBean("authorityDAO");
|
||||||
assertTrue(authDao.authorityExists(AuthenticationUtil.getSystemUserName()));
|
if (authDao.authorityExists(AuthenticationUtil.getSystemUserName()) == false)
|
||||||
assertFalse(true);
|
{
|
||||||
|
createPerson(AuthenticationUtil.getSystemUserName(), false);
|
||||||
|
}
|
||||||
|
assertTrue("No person object for System available.", authDao.authorityExists(AuthenticationUtil.getSystemUserName()));
|
||||||
|
|
||||||
super.setupTestDataImpl();
|
super.setupTestDataImpl();
|
||||||
}
|
}
|
||||||
|
@@ -582,14 +582,22 @@ public abstract class BaseRMTestCase extends RetryingTransactionHelperTestCase
|
|||||||
* @param userName user name
|
* @param userName user name
|
||||||
* @return NodeRef user node reference
|
* @return NodeRef user node reference
|
||||||
*/
|
*/
|
||||||
protected NodeRef createPerson(String userName)
|
protected NodeRef createPerson(String userName, boolean createAuth)
|
||||||
|
{
|
||||||
|
if (createAuth == true)
|
||||||
{
|
{
|
||||||
authenticationService.createAuthentication(userName, "password".toCharArray());
|
authenticationService.createAuthentication(userName, "password".toCharArray());
|
||||||
|
}
|
||||||
Map<QName, Serializable> properties = new HashMap<QName, Serializable>();
|
Map<QName, Serializable> properties = new HashMap<QName, Serializable>();
|
||||||
properties.put(ContentModel.PROP_USERNAME, userName);
|
properties.put(ContentModel.PROP_USERNAME, userName);
|
||||||
return personService.createPerson(properties);
|
return personService.createPerson(properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected NodeRef createPerson(String userName)
|
||||||
|
{
|
||||||
|
return createPerson(userName, true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup multi hierarchy test data
|
* Setup multi hierarchy test data
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user