From c8c2441ba35aebb43a7df23369ef9ed3bf870263 Mon Sep 17 00:00:00 2001 From: Tatyana Valkevych Date: Fri, 21 Aug 2015 16:42:09 +0000 Subject: [PATCH] Merged 5.0.N (5.0.3) to HEAD (5.1) 110205: Merged V4.2-BUG-FIX (4.2.6) to 5.0.N (5.0.3) 110092: Merged V4.2.5 (4.2.5) to V4.2-BUG-FIX (4.2.6) 110055: Merged DEV to PATCHES/V4.2.5 (4.2.5) 109047 : MNT-12226 : Alfresco fails to version metadata after uploading new content version even when autoVersionOnUpdateProps=true - Reimplemented previous solution. Configuration properties for autoVersioning should not affect all nodes in repo. They should just provide default behavior. - Added ability to specify default values for model properties using standard alfresco GLOBAL_PROPERTIES file. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@110627 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/rest/api/tests/TestCMIS.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/test-java/org/alfresco/rest/api/tests/TestCMIS.java b/source/test-java/org/alfresco/rest/api/tests/TestCMIS.java index a6690d27fd..a5af475c48 100644 --- a/source/test-java/org/alfresco/rest/api/tests/TestCMIS.java +++ b/source/test-java/org/alfresco/rest/api/tests/TestCMIS.java @@ -38,6 +38,7 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Properties; import java.util.Set; import org.alfresco.cmis.client.AlfrescoDocument; @@ -61,7 +62,7 @@ import org.alfresco.repo.tenant.TenantService; import org.alfresco.repo.tenant.TenantUtil; import org.alfresco.repo.tenant.TenantUtil.TenantRunAsWork; import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback; -import org.alfresco.repo.version.VersionableAspect; +import org.alfresco.repo.version.VersionableAspectTest; import org.alfresco.rest.api.tests.RepoService.SiteInformation; import org.alfresco.rest.api.tests.RepoService.TestNetwork; import org.alfresco.rest.api.tests.RepoService.TestPerson; @@ -157,7 +158,7 @@ public class TestCMIS extends EnterpriseTestApi private CMISStrictDictionaryService cmisDictionary; private QNameFilter cmisTypeExclusions; private NodeService nodeService; - private VersionableAspect versionableAspect; + private Properties globalProperties; @Before public void before() throws Exception @@ -170,14 +171,14 @@ public class TestCMIS extends EnterpriseTestApi this.cmisTypeExclusions = (QNameFilter)ctx.getBean("cmisTypeExclusions"); this.nodeService = (NodeService) ctx.getBean("NodeService"); - this.versionableAspect = (VersionableAspect) ctx.getBean("versionableAspect"); - this.versionableAspect.setEnableAutoVersionOnUpdateProps(true); + this.globalProperties = (Properties) ctx.getBean("global-properties"); + this.globalProperties.setProperty(VersionableAspectTest.AUTO_VERSION_PROPS_KEY, "true"); } @After public void after() { - this.versionableAspect.setEnableAutoVersionOnUpdateProps(false); + this.globalProperties.setProperty(VersionableAspectTest.AUTO_VERSION_PROPS_KEY, "false"); } private void checkSecondaryTypes(Document doc, Set expectedSecondaryTypes, Set expectedMissingSecondaryTypes)