mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed ALF-4551: DeletedNodeCleanupWorker will throw UnsupportedOperationException
- Included unit test to start NodeCleanupRegistry (sanity check only) - DAO call to 'purgeNodes' - Add job locking to cleanup tasks git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22255 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,7 @@ import javax.transaction.UserTransaction;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.domain.node.NodeDAO;
|
||||
import org.alfresco.repo.node.BaseNodeServiceTest;
|
||||
import org.alfresco.repo.node.cleanup.NodeCleanupRegistry;
|
||||
import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
@@ -70,6 +71,17 @@ public class DbNodeServiceImplTest extends BaseNodeServiceTest
|
||||
nodeDAO = (NodeDAO) applicationContext.getBean("nodeDAO");
|
||||
dictionaryService = (DictionaryService) applicationContext.getBean("dictionaryService");
|
||||
}
|
||||
|
||||
/**
|
||||
* Manually trigger the cleanup registry
|
||||
*/
|
||||
public void testNodeCleanupRegistry() throws Exception
|
||||
{
|
||||
setComplete();
|
||||
endTransaction();
|
||||
NodeCleanupRegistry cleanupRegistry = (NodeCleanupRegistry) applicationContext.getBean("nodeCleanupRegistry");
|
||||
cleanupRegistry.doClean();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a child node and then iterates over the children of the parent node,
|
||||
|
Reference in New Issue
Block a user