Skip to content

Commit

Permalink
Merge pull request #52 from spals/test_speed
Browse files Browse the repository at this point in the history
Parallel builds in Maven
  • Loading branch information
timkral authored Jan 5, 2019
2 parents 94a3a69 + 27206d3 commit b2b12b2
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sudo: required

cache:
directories:
- ${HOME}/.m2/repository
- ${HOME}/.m2

services:
- docker
Expand All @@ -20,13 +20,13 @@ before_install:
- wget https://raw.githubusercontent.com/spals/parent-pom/master/.travis/deploy-lib.sh -O ${TRAVIS_BUILD_DIR}/.travis/deploy-lib.sh
- wget https://raw.githubusercontent.com/spals/parent-pom/master/.travis/settings.xml -O ${TRAVIS_BUILD_DIR}/.travis/settings.xml

install:
- mvn --quiet --settings .travis/settings.xml dependency:resolve -Ddeploy
- mvn --quiet --settings .travis/settings.xml dependency:resolve-plugins -Ddeploy

script:
- mvn --batch-mode --settings .travis/settings.xml --show-version verify -DrunReporting

before_deploy:
- mvn --settings .travis/settings.xml --show-version dependency:resolve -Ddeploy
- mvn --settings .travis/settings.xml --show-version dependency:resolve-plugins -Ddeploy

deploy:
- provider: script
script: bash .travis/deploy-lib.sh .travis/settings.xml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.spals.appbuilder.app.dropwizard;

import io.dropwizard.Configuration;
import io.dropwizard.testing.ConfigOverride;
import io.dropwizard.testing.DropwizardTestSupport;
import net.spals.appbuilder.app.examples.dropwizard.cors.CorsDropwizardWebApp;
import org.testng.annotations.AfterClass;
Expand All @@ -26,7 +27,11 @@
public class CorsDropwizardWebAppFTest {

private final DropwizardTestSupport<Configuration> testServerWrapper =
new DropwizardTestSupport<>(CorsDropwizardWebApp.class, new Configuration());
new DropwizardTestSupport<>(
CorsDropwizardWebApp.class,
"",
ConfigOverride.config("server.applicationConnectors[0].port", "0")
);

private final Client webClient = ClientBuilder.newClient();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.spals.appbuilder.app.dropwizard;

import io.dropwizard.Configuration;
import io.dropwizard.testing.ConfigOverride;
import io.dropwizard.testing.DropwizardTestSupport;
import net.spals.appbuilder.app.examples.dropwizard.doc.DocDropwizardWebApp;
import org.testng.annotations.AfterClass;
Expand Down Expand Up @@ -28,7 +29,11 @@
public class DocDropwizardWebAppFTest {

private final DropwizardTestSupport<Configuration> testServerWrapper =
new DropwizardTestSupport<>(DocDropwizardWebApp.class, new Configuration());
new DropwizardTestSupport<>(
DocDropwizardWebApp.class,
"",
ConfigOverride.config("server.applicationConnectors[0].port", "0")
);

private final Client webClient = ClientBuilder.newClient();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.google.inject.TypeLiteral;
import io.dropwizard.Configuration;
import io.dropwizard.setup.Environment;
import io.dropwizard.testing.ConfigOverride;
import io.dropwizard.testing.DropwizardTestSupport;
import io.opentracing.Tracer;
import net.spals.appbuilder.app.examples.dropwizard.minimal.MinimalDropwizardWebApp;
Expand All @@ -32,7 +33,11 @@
public class MinimalDropwizardWebAppFTest {

private final DropwizardTestSupport<Configuration> testServerWrapper =
new DropwizardTestSupport<>(MinimalDropwizardWebApp.class, new Configuration());
new DropwizardTestSupport<>(
MinimalDropwizardWebApp.class,
"",
ConfigOverride.config("server.applicationConnectors[0].port", "0")
);
private DropwizardWebApp webAppDelegate;

@BeforeClass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.spals.appbuilder.app.dropwizard;

import io.dropwizard.Configuration;
import io.dropwizard.testing.ConfigOverride;
import io.dropwizard.testing.DropwizardTestSupport;
import io.opentracing.mock.MockSpan;
import io.opentracing.mock.MockTracer;
Expand All @@ -24,7 +25,11 @@
public class TracingDropwizardWebAppFTest {

private final DropwizardTestSupport<Configuration> testServerWrapper =
new DropwizardTestSupport<>(TracingDropwizardWebApp.class, new Configuration());
new DropwizardTestSupport<>(
TracingDropwizardWebApp.class,
"",
ConfigOverride.config("server.applicationConnectors[0].port", "0")
);
private MockTracer mockTracer;

private final Client webClient = ClientBuilder.newClient();
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>net.spals</groupId>
<artifactId>spals-parent-pom</artifactId>
<version>19</version>
<version>22</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down

0 comments on commit b2b12b2

Please sign in to comment.