Merged 5.2.N (5.2.1) to HEAD (5.2)

124519 rmunteanu: Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)
      124491 aleahu: Merged 5.0.N (5.0.4) to 5.1.N (5.1.2)
         124465 aleahu: Merged V4.2-BUG-FIX (4.2.7) to 5.0.N (5.0.4)
            124433 aleahu: Merged V4.2.6 (4.2.6) to V4.2-BUG-FIX (4.2.7)
               124363 adragoi: MNT-15846 : The RenditionServiceIntegrationTest.testRenderPdfDocumentLongRunningCheckout fails on DB2
                  - wait thread to finish checkout 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@127760 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-06-03 16:04:09 +00:00
parent ba3c1bf61c
commit 9abc53e701
2 changed files with 13 additions and 1 deletions

View File

@@ -647,6 +647,11 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
* @throws Exception
*/
protected void renderPdfDocumentLongRunningTest(AbstractNodeModifyingRunnable nodeModifyingRunnable) throws Exception
{
renderPdfDocumentLongRunningTest(nodeModifyingRunnable, false);
}
protected void renderPdfDocumentLongRunningTest(AbstractNodeModifyingRunnable nodeModifyingRunnable, boolean joinNodeModifyingThread) throws Exception
{
this.setComplete();
this.endTransaction();
@@ -697,6 +702,11 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
// Give a moment for roll back of rendition and commit of node modification to occur
Thread.sleep(3000);
if (joinNodeModifyingThread)
{
nodeModifyingThread.join();
}
// Note that the node modification is retried on failure by RetryingTransactionHelper
// and will always succeed after the rendition is complete, but due to the
// sleep in AbstractNodeModifyingRunnable isModificationUnblocked will still
@@ -732,7 +742,7 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
checkOutCheckInService.checkout(nodeWithDocContent);
}
};
renderPdfDocumentLongRunningTest(new CheckoutRunnable(nodeWithDocContent));
renderPdfDocumentLongRunningTest(new CheckoutRunnable(nodeWithDocContent), true);
}
finally
{