Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

61361: BDE-180 Refactored the system tests to use the maven tomcat plugin, self-contained alf_data/database and tests running in parallel.
   Removed duplicate freemarker jar.  Now uses the one defined in the repo project
   add JCL for Slf4j
   Fixed failing JmxScriptTest by ensuring that "quick" files are loaded from the classpath
   Changed the unpacking of upstream resources to the "prepare-package" phase
   BDE-249 Separate unit tests in a test suite on their own
      Moved the thor unit tests into their own suite
      Moved the enterprise remote-api unit tests into their own suite
      Moved the enterprise repository unit tests into their own suite
      Moved the webclient unit tests into their own suite
      Moved the wdr unit tests into their own suite
      Moved the repository unit tests into their own suite
      Moved the remote-api unit tests into their own suite
   Change null to "" for freemarker template
   Moved META-INF/services so they get added to the jar
   Speeding up the wcmquickstart client tests, reducing the thread.sleeps().
   Fixed failing date/time tests, remove a redundant test and corrected an import
   Added a h2 profile for running against a h2 database


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62415 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-12 15:23:04 +00:00
parent b9ab82bd33
commit 3bd8f068c0
6 changed files with 111 additions and 20 deletions

View File

@@ -45,7 +45,7 @@
<#elseif roles = "managers"> <#elseif roles = "managers">
"siteManagers": "siteManagers":
[ [
<#assign managers = site.listMembers(null, "SiteManager", 0, true)?keys /> <#assign managers = site.listMembers("", "SiteManager", 0, true)?keys />
<#list managers as manager> <#list managers as manager>
"${manager}"<#if manager_has_next>,</#if> "${manager}"<#if manager_has_next>,</#if>
</#list> </#list>

61
pom.xml
View File

@@ -89,6 +89,10 @@
<artifactId>commons-logging</artifactId> <artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId> <groupId>commons-logging</groupId>
</exclusion> </exclusion>
<exclusion>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
</exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
@@ -235,6 +239,10 @@
<artifactId>commons-collections</artifactId> <artifactId>commons-collections</artifactId>
<groupId>commons-collections</groupId> <groupId>commons-collections</groupId>
</exclusion> </exclusion>
<exclusion>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
</exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
@@ -271,8 +279,37 @@
<version>7.3.0.v20110203</version> <version>7.3.0.v20110203</version>
</dependency> </dependency>
</dependencies> </dependencies>
<profiles>
<build> <profile>
<id>integration-tests</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>test</goal>
</goals>
<configuration>
<forkMode>always</forkMode>
<includes combine.self="override">
<include>**/org/alfresco/RemoteApi*TestSuite.java</include>
<include>**/org/alfresco/repo/webdav/PutMethodTest.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins> <plugins>
<!-- Wipe the database before starting tests --> <!-- Wipe the database before starting tests -->
<plugin> <plugin>
@@ -303,14 +340,18 @@
</plugin> </plugin>
<plugin> <plugin>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <executions>
<forkMode>always</forkMode> <execution>
<includes combine.self="override"> <id>default-test</id>
<include>**/org/alfresco/RemoteApi*TestSuite.java</include> <!-- There's also surefire configuration in the integration-tests profile -->
<include>**/org/alfresco/repo/webdav/PutMethodTest.java</include> <configuration>
</includes> <includes>
</configuration> <include>**/org/alfresco/remoteapi/AllUnitTestsSuite.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin> </plugin>
<!-- We still use committed generated sources --> <!-- We still use committed generated sources -->

View File

@@ -18,9 +18,9 @@
*/ */
package org.alfresco; package org.alfresco;
import junit.framework.JUnit4TestAdapter;
import junit.framework.Test; import junit.framework.Test;
import junit.framework.TestSuite; import junit.framework.TestSuite;
import junit.framework.JUnit4TestAdapter;
/** /**
* All Remote API project test classes and test suites as a sequence of RemoteApi&lt;NN>TestSuite * All Remote API project test classes and test suites as a sequence of RemoteApi&lt;NN>TestSuite
@@ -69,16 +69,9 @@ public class RemoteApi01TestSuite extends TestSuite
static void tests5(TestSuite suite) // static void tests5(TestSuite suite) //
{ {
suite.addTestSuite(org.alfresco.repo.web.util.PagingCursorTest.class);
suite.addTestSuite(org.alfresco.repo.web.util.paging.PagingTest.class);
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.GetMethodTest.class));
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.LockInfoImplTest.class));
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.MoveMethodTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.MoveMethodTest.class));
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.RenameShuffleDetectionTest.class));
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.UnlockMethodTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.UnlockMethodTest.class));
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.WebDAVHelperIntegrationTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.WebDAVHelperIntegrationTest.class));
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.WebDAVHelperTest.class));
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.WebDAVLockServiceImplTest.class));
suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.WebDAVMethodTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.webdav.WebDAVMethodTest.class));
suite.addTestSuite(org.alfresco.repo.webservice.CMLUtilTest.class); suite.addTestSuite(org.alfresco.repo.webservice.CMLUtilTest.class);
} }
@@ -97,7 +90,6 @@ public class RemoteApi01TestSuite extends TestSuite
static void tests8(TestSuite suite) // static void tests8(TestSuite suite) //
{ {
suite.addTest(new JUnit4TestAdapter(org.alfresco.rest.framework.tests.core.AllRestFrameworkTest.class));
suite.addTest(new JUnit4TestAdapter(org.alfresco.rest.workflow.api.tests.DeploymentWorkflowApiTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.rest.workflow.api.tests.DeploymentWorkflowApiTest.class));
suite.addTest(new JUnit4TestAdapter(org.alfresco.rest.workflow.api.tests.ProcessDefinitionWorkflowApiTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.rest.workflow.api.tests.ProcessDefinitionWorkflowApiTest.class));
} }

View File

@@ -0,0 +1,58 @@
package org.alfresco.remoteapi;
import junit.framework.JUnit4TestAdapter;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.alfresco.repo.web.util.PagingCursorTest;
import org.alfresco.repo.web.util.paging.PagingTest;
import org.alfresco.repo.webdav.GetMethodTest;
import org.alfresco.repo.webdav.LockInfoImplTest;
import org.alfresco.repo.webdav.RenameShuffleDetectionTest;
import org.alfresco.repo.webdav.WebDAVHelperTest;
import org.alfresco.repo.webdav.WebDAVLockServiceImplTest;
import org.alfresco.rest.framework.tests.core.AllRestFrameworkTest;
import org.alfresco.rest.framework.tests.metadata.WriterTests;
/**
* All Remote API project UNIT test classes should be added to this test suite.
*/
public class AllUnitTestsSuite extends TestSuite
{
/**
* Creates the test suite
*
* @return the test suite
*/
public static Test suite()
{
TestSuite suite = new TestSuite();
publicApiTests(suite);
webdavTests(suite);
pagingTests(suite);
return suite;
}
static void publicApiTests(TestSuite suite)
{
suite.addTest(new JUnit4TestAdapter(AllRestFrameworkTest.class));
suite.addTest(new JUnit4TestAdapter(WriterTests.class));
}
static void webdavTests(TestSuite suite)
{
suite.addTest(new JUnit4TestAdapter(GetMethodTest.class));
suite.addTest(new JUnit4TestAdapter(LockInfoImplTest.class));
suite.addTest(new JUnit4TestAdapter(RenameShuffleDetectionTest.class));
suite.addTest(new JUnit4TestAdapter(WebDAVHelperTest.class));
suite.addTest(new JUnit4TestAdapter(WebDAVLockServiceImplTest.class));
}
static void pagingTests(TestSuite suite)
{
suite.addTest(new JUnit4TestAdapter(PagingTest.class));
suite.addTest(new JUnit4TestAdapter(PagingCursorTest.class));
}
}