mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged 5.1.N (5.1.1) to HEAD (5.1)
120969 amorarasu: Merged 5.0.N (5.0.4) to 5.1.N (5.1.1) 120957 rneamtu: Merged NESS/5.0.N-2016-01-05/ (5.0.4) to 5.0.N (5.0.4) 120843: MNT-14386 : renditionService.render method is creating a temporary file in User's trashcan - Added temporary aspect on temporary rendition before delete it 120927: MNT-14386 : renditionService.render method is creating a temporary file in User's trashcan - Added a test for case git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@123637 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -264,6 +264,7 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
|
||||
final QName renditionName = QName.createQName(NamespaceService.RENDITION_MODEL_1_0_URI,
|
||||
"htmlRenderingDefinition");
|
||||
|
||||
int numberOfItemsInTrashcanBeforeRendition = getNumberOfItemsInTrashcan();
|
||||
this.renditionNode = transactionHelper
|
||||
.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<NodeRef>()
|
||||
{
|
||||
@@ -294,8 +295,24 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
|
||||
}
|
||||
});
|
||||
|
||||
//testcase for MNT-14386
|
||||
int numberOfItemsInTrashcanAfterRendition = getNumberOfItemsInTrashcan();
|
||||
assertEquals(numberOfItemsInTrashcanBeforeRendition, numberOfItemsInTrashcanAfterRendition);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method returns the number of items from trashcan
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
private int getNumberOfItemsInTrashcan()
|
||||
{
|
||||
NodeRef archiveRootNodeRef = nodeService.getRootNode(StoreRef.STORE_REF_ARCHIVE_SPACESSTORE);
|
||||
return nodeService.countChildAssocs(archiveRootNodeRef, true);
|
||||
|
||||
}
|
||||
|
||||
public void testRenderFreeMarkerTemplateOneTransaction() throws Exception
|
||||
{
|
||||
this.setComplete();
|
||||
@@ -1934,7 +1951,7 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
|
||||
assertEquals(MimetypeMap.MIMETYPE_FLASH, webpreviewRenditionDef.getParameterValue(AbstractRenderingEngine.PARAM_MIME_TYPE));
|
||||
assertEquals(MimetypeMap.MIMETYPE_IMAGE_PNG, avatarRenditionDef.getParameterValue(AbstractRenderingEngine.PARAM_MIME_TYPE));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This test checks that for a node with an existing rendition, that if you update its content with content
|
||||
* that cannot be renditioned (thumbnailed), that existing rendition nodes for failed re-renditions are removed.
|
||||
|
Reference in New Issue
Block a user