mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-2072 (Concurrency exceptions and deadlocks on Records Management "File to" rule)
* Fixed the failing test git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.2.1.x@102279 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -203,26 +203,39 @@ public class FileToActionTest extends BaseRMTestCase
|
||||
|
||||
private void createRecord(final String path, final String name, final String resolvedPath)
|
||||
{
|
||||
final String[] pathValues = StringUtils.tokenizeToStringArray(resolvedPath, "/");
|
||||
|
||||
// set parameters
|
||||
Map<String, Serializable> params = new HashMap<String, Serializable>(1);
|
||||
params.put(FileToAction.PARAM_PATH, path);
|
||||
params.put(FileToAction.PARAM_CREATE_RECORD_PATH, true);
|
||||
|
||||
doTestInTransaction(new Test<Void>()
|
||||
{
|
||||
public Void run() throws Exception
|
||||
{
|
||||
String[] pathValues = StringUtils.tokenizeToStringArray(resolvedPath, "/");
|
||||
|
||||
// show the folder doesn't exist to begin with
|
||||
FileInfo createdRecordFolder = fileFolderService.resolveNamePath(filePlan, new ArrayList<String>(Arrays.asList(pathValues)), false);
|
||||
//assertNull(createdRecordFolder);
|
||||
assertNull(createdRecordFolder);
|
||||
|
||||
// set parameters
|
||||
Map<String, Serializable> params = new HashMap<String, Serializable>(1);
|
||||
params.put(FileToAction.PARAM_PATH, path);
|
||||
params.put(FileToAction.PARAM_CREATE_RECORD_PATH, true);
|
||||
|
||||
// execute file-to action
|
||||
rmActionService.executeRecordsManagementAction(dmDocument, FileToAction.NAME, params);
|
||||
return null;
|
||||
}
|
||||
}, ADMIN_USER);
|
||||
|
||||
// execute file-to action
|
||||
rmActionService.executeRecordsManagementAction(dmDocument, FileToAction.NAME, params);
|
||||
|
||||
doTestInTransaction(new Test<Void>()
|
||||
{
|
||||
public Void run() throws Exception
|
||||
{
|
||||
// show the folder has now been created
|
||||
createdRecordFolder = fileFolderService.resolveNamePath(filePlan, new ArrayList<String>(Arrays.asList(pathValues)), false);
|
||||
FileInfo createdRecordFolder = fileFolderService.resolveNamePath(filePlan, new ArrayList<String>(Arrays.asList(pathValues)), false);
|
||||
assertNotNull(createdRecordFolder);
|
||||
assertEquals(name, createdRecordFolder.getName());
|
||||
NodeRef createdRecordFolderNodeRef = createdRecordFolder.getNodeRef();
|
||||
|
Reference in New Issue
Block a user