Called the method to test inside another transaction.

This commit is contained in:
Roxana Lucanu-Ghetu
2016-06-30 12:00:23 +03:00
parent 1c7a84e481
commit 07227ed9e0

View File

@@ -29,6 +29,7 @@ package org.alfresco.module.org_alfresco_module_rm.test.integration.issue;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase;
import org.alfresco.module.org_alfresco_module_rm.test.util.TestModel;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.util.GUID;
import org.springframework.extensions.surf.util.I18NUtil;
@@ -54,8 +55,14 @@ public class RM3450Test extends BaseRMTestCase
@Override
public void run() throws Exception
{
//expect failure
fileFolderService.create(unfiledContainer, GUID.generate(), TestModel.NOT_RM_FOLDER_TYPE).getNodeRef();
transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback<Object>()
{
public Object execute() throws Exception
{
fileFolderService.create(unfiledContainer, GUID.generate(), TestModel.NOT_RM_FOLDER_TYPE).getNodeRef();
return null;
}
}, false, true);
}
}, ADMIN_USER);
}