KNOX-1709 - Allow tests to run in parallel
authorKevin Risden <krisden@apache.org>
Sat, 9 Feb 2019 20:24:28 +0000 (15:24 -0500)
committerKevin Risden <krisden@apache.org>
Mon, 11 Feb 2019 15:21:45 +0000 (10:21 -0500)
Signed-off-by: Kevin Risden <krisden@apache.org>
.travis.yml
gateway-test-utils/src/main/java/org/apache/knox/test/TestUtils.java
gateway-test/pom.xml
gateway-test/src/test/java/org/apache/knox/gateway/deploy/DeploymentFactoryFuncTest.java

index e81454e..e7186d8 100644 (file)
@@ -30,18 +30,11 @@ services:
   - docker
 before_install:
   - docker pull $IMAGE
-install:
-  # Print the Maven version, skip tests and javadoc
-  # argLine to work around https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911925
-  - $DOCKERRUN $IMAGE mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Djavax.net.ssl.trustStorePassword=changeit -DargLine="-Djdk.net.URLClassPath.disableClassPathURLCheck=true" -B -V
 script:
-  # Print surefire output to the console instead of files
   # argLine to work around https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911925
-  - unset _JAVA_OPTIONS
-  - $DOCKERRUN $IMAGE mvn -Dsurefire.useFile=false -Dsurefire.parallel= -Djavax.net.ssl.trustStorePassword=changeit -DargLine="-Djdk.net.URLClassPath.disableClassPathURLCheck=true" verify
+  - $DOCKERRUN $IMAGE mvn -T1C verify -Dsurefire.useFile=false -Djavax.net.ssl.trustStorePassword=changeit -DargLine="-Djdk.net.URLClassPath.disableClassPathURLCheck=true" -B -V
 git:
   depth: 1000
-sudo: required
 cache:
   directories:
     - $HOME/.m2
index 88e1030..163fd9a 100644 (file)
@@ -52,7 +52,7 @@ import java.util.concurrent.TimeUnit;
 public class TestUtils {
   private static final Logger LOG = Logger.getLogger(TestUtils.class);
 
-  public static final long SHORT_TIMEOUT = 1000L;
+  public static final long SHORT_TIMEOUT = 5000L;
   public static final long MEDIUM_TIMEOUT = 30 * 1000L;
   public static final long LONG_TIMEOUT = 60 * 1000L;
 
index 736f8e6..dd681c8 100644 (file)
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
-                    <forkCount>1</forkCount>
+                    <forkCount>1C</forkCount>
                     <reuseForks>false</reuseForks>
                     <systemPropertyVariables>
                         <project.version>${project.version}</project.version>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-failsafe-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <executions>
                     <execution>
index 3ec5040..e28e8d0 100644 (file)
@@ -72,7 +72,7 @@ public class DeploymentFactoryFuncTest {
   private static final long MEDIUM_TIMEOUT = 5 * SHORT_TIMEOUT;
   private static final long LONG_TIMEOUT = 10 * MEDIUM_TIMEOUT;
 
-  @Test( timeout = MEDIUM_TIMEOUT )
+  @Test( timeout = LONG_TIMEOUT )
   public void testGenericProviderDeploymentContributor() throws ParserConfigurationException, SAXException, IOException {
     LOG_ENTER();
     GatewayTestConfig config = new GatewayTestConfig();
@@ -198,7 +198,7 @@ public class DeploymentFactoryFuncTest {
     LOG_EXIT();
   }
 
-  @Test( timeout = MEDIUM_TIMEOUT )
+  @Test( timeout = LONG_TIMEOUT )
   public void testSimpleTopology() throws IOException, SAXException, ParserConfigurationException {
     LOG_ENTER();
     GatewayTestConfig config = new GatewayTestConfig();
@@ -633,7 +633,7 @@ public class DeploymentFactoryFuncTest {
    * and service uses anonymous authentication in which case we should
    * add AnonymousFilter to the filter chain.
    */
-  @Test( timeout = MEDIUM_TIMEOUT )
+  @Test( timeout = LONG_TIMEOUT )
   public void testServiceAnonAuth() throws IOException, SAXException, ParserConfigurationException {
     LOG_ENTER();
     final GatewayTestConfig config = new GatewayTestConfig();