From c5abaaec030889d080548f9fc8cbcc9a1844ddca Mon Sep 17 00:00:00 2001 From: Alan Davis Date: Fri, 16 May 2014 17:50:11 +0000 Subject: [PATCH] Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud) 69767: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (4.3/Cloud) 69723: MNT-11123 : Test failure in TestEnterpriseAtomPubTCK Added code which check status of node (it has private working copy). Merged DEV to 4.2-BUG-FIX 67109 : MNT-11123 : Test failure in TestEnterpriseAtomPubTCK Fixed RenditionServiceIntegrationTest.testRenderPdfDocumentLongRunningCheckout test. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@70450 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/opencmis/CMISNodeInfoImpl.java | 3 +- .../RenditionServiceIntegrationTest.java | 33 ++++++++++++------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/source/java/org/alfresco/opencmis/CMISNodeInfoImpl.java b/source/java/org/alfresco/opencmis/CMISNodeInfoImpl.java index 194d556d4c..6e48e63aa4 100644 --- a/source/java/org/alfresco/opencmis/CMISNodeInfoImpl.java +++ b/source/java/org/alfresco/opencmis/CMISNodeInfoImpl.java @@ -178,7 +178,8 @@ public class CMISNodeInfoImpl implements CMISNodeInfo objecVariant = CMISObjectVariant.CURRENT_VERSION; objectId = connector.constructObjectId(nodeRef, CMISConnector.UNVERSIONED_VERSION_LABEL); versionLabel = CMISConnector.UNVERSIONED_VERSION_LABEL; - currentObjectId = objectId; + currentObjectId = objectId; + hasPWC = connector.getCheckOutCheckInService().isCheckedOut(nodeRef); } protected void analyseObjectId() diff --git a/source/test-java/org/alfresco/repo/rendition/RenditionServiceIntegrationTest.java b/source/test-java/org/alfresco/repo/rendition/RenditionServiceIntegrationTest.java index 3e97c3d1df..9e27d3e9b9 100644 --- a/source/test-java/org/alfresco/repo/rendition/RenditionServiceIntegrationTest.java +++ b/source/test-java/org/alfresco/repo/rendition/RenditionServiceIntegrationTest.java @@ -669,21 +669,30 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest */ public void testRenderPdfDocumentLongRunningCheckout() throws Exception { - class CheckoutRunnable extends AbstractNodeModifyingRunnable + try { - public CheckoutRunnable(NodeRef nodeRef) + class CheckoutRunnable extends AbstractNodeModifyingRunnable { - super(nodeRef); - } - protected void modifyNode(NodeRef nodeRef) - { - AuthenticationUtil.setRunAsUserSystem(); - CheckOutCheckInService checkOutCheckInService = + public CheckoutRunnable(NodeRef nodeRef) + { + super(nodeRef); + } + protected void modifyNode(NodeRef nodeRef) + { + AuthenticationUtil.setRunAsUserSystem(); + CheckOutCheckInService checkOutCheckInService = (CheckOutCheckInService) applicationContext.getBean("checkOutCheckInService"); - checkOutCheckInService.checkout(nodeWithDocContent); - } - }; - renderPdfDocumentLongRunningTest(new CheckoutRunnable(nodeWithDocContent)); + checkOutCheckInService.checkout(nodeWithDocContent); + } + }; + renderPdfDocumentLongRunningTest(new CheckoutRunnable(nodeWithDocContent)); + } + finally + { + AuthenticationUtil.setRunAsUserSystem(); + CheckOutCheckInService checkOutCheckInService = (CheckOutCheckInService) applicationContext.getBean("CheckOutCheckInService"); + checkOutCheckInService.cancelCheckout(checkOutCheckInService.getWorkingCopy(nodeWithDocContent)); + } } /**