diff --git a/README.md b/README.md index 98395fbe0ba..e797f4e82c2 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,12 @@ Runs the tests > mvn test ``` +Tests can be run with specified httpPort. + +``` +> mvn test -Dvertx.httpPort=8888 +``` + Vert.x supports native transport on BSD and Linux, to run the tests with native transport ``` diff --git a/src/test/java/io/vertx/core/http/HttpTestBase.java b/src/test/java/io/vertx/core/http/HttpTestBase.java index ad1998dc51c..e9b5a547282 100644 --- a/src/test/java/io/vertx/core/http/HttpTestBase.java +++ b/src/test/java/io/vertx/core/http/HttpTestBase.java @@ -35,6 +35,7 @@ public class HttpTestBase extends VertxTestBase { public static final String DEFAULT_HTTP_HOST = "localhost"; public static final int DEFAULT_HTTP_PORT = Integer.parseInt(System.getProperty("vertx.httpPort", "8080")); + public static final int DEFAULT_HTTP_HOST_AND_PORT = Integer.parseInt(System.getProperty("vertx.httpHostPort", "localhost:8080")); public static final String DEFAULT_HTTPS_HOST = "localhost"; public static final int DEFAULT_HTTPS_PORT = 4043; public static final String DEFAULT_HTTPS_HOST_AND_PORT = "localhost:4043";