From 2bfc1ca0cc01a444ff0891ddaa3dd6dc06fe6d54 Mon Sep 17 00:00:00 2001 From: Samuel Langlois Date: Wed, 18 Jul 2012 08:46:03 +0000 Subject: [PATCH] BDE-73 BDE-78 Add more tests to compute coverage + fetch application context from classpath rather than file system git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@39409 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- pom.xml | 49 +++++++++++-------- .../deploy/DeploymentServiceImplFSTest.java | 6 +-- .../repo/deploy/DeploymentServiceTest.java | 6 +-- 3 files changed, 35 insertions(+), 26 deletions(-) diff --git a/pom.xml b/pom.xml index 95b9222930..977333c983 100644 --- a/pom.xml +++ b/pom.xml @@ -593,32 +593,41 @@ maven-surefire-plugin - **/org/alfresco/RepositoryStartupTest.* - **/org/alfresco/encryption/** - **/org/alfresco/repo/action/** - **/org/alfresco/repo/bulkimport/** - **/org/alfresco/repo/cache/** - **/org/alfresco/repo/calendar/** - **/org/alfresco/repo/coci/** - **/org/alfresco/repo/cluster/** - **/org/alfresco/repo/configuration/** - **/org/alfresco/repo/content/** - **/org/alfresco/repo/deploy/ASRDeploymentTest.* - **/org/alfresco/repo/descriptor/** - **/org/alfresco/repo/dictionary/** - **/org/alfresco/repo/discussion/** - **/org/alfresco/repo/domain/*.* - **/org/alfresco/repo/domain/audit/** - **/org/alfresco/repo/forms/processor/workflow/WorkflowFormProcessorTest.* - **/org/alfresco/service/cmr/repository/** - **/org/alfresco/tools/** - **/org/alfresco/util/** + + **/*Test.* + + + **/org/alfresco/repo/avm/*TestP.* + **/org/alfresco/repo/avm/AVMServiceTestBase.* + + **/org/alfresco/encryption/EncryptionTests.* + **/org/alfresco/jcr/test/BaseJCRTest.* **/org/alfresco/repo/action/evaluator/HasChildEvaluatorTest.* **/org/alfresco/repo/action/scheduled/ScheduledPersistedActionServiceTest.* + **/org/alfresco/repo/avm/AVMServiceRemoteSystemTest.* **/org/alfresco/repo/content/transform/OOXMLThumbnailContentTransformerTest.* + **/org/alfresco/repo/domain/avm/AVMStoreDAOTest.* + + + **/org/alfresco/RepositoryStartStopTest.* + **/org/alfresco/cmis/changelog/CMISChangeLogServiceTest.* + **/org/alfresco/cmis/renditions/CMISRenditionServiceTest.* + **/org/alfresco/repo/avm/AVMCrawlTestP.* + **/org/alfresco/repo/avm/AVMScaleTestP.* + **/org/alfresco/repo/avm/AVMStressTestP.* + **/org/alfresco/repo/avm/PurgeTestP.* + **/org/alfresco/repo/avm/AVMServiceLocalTest.* + **/org/alfresco/repo/avm/AVMServiceTest.* + **/org/alfresco/repo/avm/locking/AVMLockingServiceTest.* + **/org/alfresco/repo/blog/BlogServiceImplTest.* + **/org/alfresco/repo/deploy/DeploymentServiceImplFSTest.* + **/org/alfresco/repo/deploy/DeploymentServiceTest.* + + + **/org/alfresco/repo/content/AbstractContentReaderLimitTest.* diff --git a/source/java/org/alfresco/repo/deploy/DeploymentServiceImplFSTest.java b/source/java/org/alfresco/repo/deploy/DeploymentServiceImplFSTest.java index 3ae87ba865..28ca01042e 100644 --- a/source/java/org/alfresco/repo/deploy/DeploymentServiceImplFSTest.java +++ b/source/java/org/alfresco/repo/deploy/DeploymentServiceImplFSTest.java @@ -42,7 +42,7 @@ import org.alfresco.util.Deleter; import org.alfresco.util.NameMatcher; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.context.support.FileSystemXmlApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * End to end test of deployment to a file system receiver (FSR). @@ -82,8 +82,8 @@ public class DeploymentServiceImplFSTest extends AVMServiceTestBase * Start the FSR */ @SuppressWarnings("unused") - FileSystemXmlApplicationContext receiverContext = - new FileSystemXmlApplicationContext("../deployment/config/application-context.xml"); + ClassPathXmlApplicationContext receiverContext = + new ClassPathXmlApplicationContext("application-context.xml"); // Fetch application context from deployment service = (DeploymentService)fContext.getBean("DeploymentService"); } diff --git a/source/java/org/alfresco/repo/deploy/DeploymentServiceTest.java b/source/java/org/alfresco/repo/deploy/DeploymentServiceTest.java index 9d3e8478ed..29029e48b2 100644 --- a/source/java/org/alfresco/repo/deploy/DeploymentServiceTest.java +++ b/source/java/org/alfresco/repo/deploy/DeploymentServiceTest.java @@ -60,7 +60,7 @@ import org.alfresco.wcm.util.WCMUtil; import org.alfresco.wcm.webproject.WebProjectInfo; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.context.support.FileSystemXmlApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Test of deployment to a Test Server. @@ -116,8 +116,8 @@ public class DeploymentServiceTest extends AbstractWCMServiceImplTest * Start the FSR */ @SuppressWarnings("unused") - FileSystemXmlApplicationContext receiverContext = - new FileSystemXmlApplicationContext("../deployment/config/application-context.xml"); + ClassPathXmlApplicationContext receiverContext = + new ClassPathXmlApplicationContext("application-context.xml"); // Fetch application context from deployment }