SHA-1966: Deleting a link causes huge memory and cache usage and eventually OOM error

- Replaced XPATH search for links to a canned query
   - Removed the XPATH search for existing nodes with the same name =>catch exception

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@133960 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ramona Neamtu
2016-12-21 10:04:36 +00:00
parent f371dd270a
commit 5d546877f2
8 changed files with 373 additions and 135 deletions

View File

@@ -329,10 +329,12 @@ public class DocumentLinkServiceImplTest extends TestCase
}, TEST_USER);
// check if the service found 2 links of the document
assertEquals(report.getTotalLinksFoundCount(), 2);
assertEquals(2, report.getTotalLinksFoundCount());
// check if the service successfully deleted one
assertEquals(report.getDeletedLinksCount(), 1);
assertEquals(1, report.getDeletedLinksCount());
assertEquals(true, nodeService.hasAspect(site1File2, ApplicationModel.ASPECT_LINKED));
// check if the second one failed with access denied
Throwable ex = report.getErrorDetails().get(linkOfFile1Site2);