From 47837f9286b016e1dc121380c32cb5bb6fa9a07c Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Tue, 9 Mar 2010 19:06:08 +0000 Subject: [PATCH] Fix the AVM test suite so that all AVM tests can be run from it, and enable that instead of individual tests in build.xml git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19167 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/repo/avm/AVMServiceLocalTest.java | 8 ++++---- .../java/org/alfresco/repo/avm/AVMTestSuite.java | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/source/java/org/alfresco/repo/avm/AVMServiceLocalTest.java b/source/java/org/alfresco/repo/avm/AVMServiceLocalTest.java index 5410daf989..e917100a42 100644 --- a/source/java/org/alfresco/repo/avm/AVMServiceLocalTest.java +++ b/source/java/org/alfresco/repo/avm/AVMServiceLocalTest.java @@ -63,19 +63,19 @@ public class AVMServiceLocalTest extends TestCase /** * The AVMRemote - can be local (AVMRemoteLocal) or remote (AVMRemote) */ - protected static AVMRemote fService; + protected AVMRemote fService; /** * The AVMSyncService - can be local (AVMSyncService) or remote (AVMSyncServiceRemote) */ - protected static AVMSyncService fSyncService; + protected AVMSyncService fSyncService; /** * The application context. */ - protected static ApplicationContext fContext; + protected ApplicationContext fContext; - protected static NameMatcher excluder; + protected NameMatcher excluder; protected void setUp() throws Exception diff --git a/source/java/org/alfresco/repo/avm/AVMTestSuite.java b/source/java/org/alfresco/repo/avm/AVMTestSuite.java index 11a670fcd7..f65caee7bf 100644 --- a/source/java/org/alfresco/repo/avm/AVMTestSuite.java +++ b/source/java/org/alfresco/repo/avm/AVMTestSuite.java @@ -22,6 +22,8 @@ import junit.framework.Test; import junit.framework.TestSuite; import org.alfresco.repo.avm.locking.AVMLockingServiceTest; +import org.alfresco.repo.avm.util.VersionPathTest; +import org.alfresco.util.ApplicationContextHelper; /** * AVM test suite @@ -37,6 +39,11 @@ public class AVMTestSuite extends TestSuite { TestSuite suite = new TestSuite(); + // Ensure that the default context is available + ApplicationContextHelper.getApplicationContext(); + + // Add the tests to be run + suite.addTestSuite(AVMNodeConverterTest.class); suite.addTestSuite(AVMExpiredContentTest.class); suite.addTestSuite(AVMDeploymentAttemptCleanerTest.class); @@ -59,6 +66,13 @@ public class AVMTestSuite extends TestSuite suite.addTestSuite(AVMDiffPerformanceTest.class); suite.addTestSuite(AVMChildNamePatternMatchPerformanceTest.class); + suite.addTestSuite(VersionPathTest.class); + suite.addTestSuite(WCMInheritPermissionsTest.class); + + // This should go last, as its uses a different + // context to the other tests + suite.addTestSuite(AVMServiceRemoteSystemTest.class); + return suite; } }