Rework native tests by using profiles and dependencies don't use specific classifiers

This commit is contained in:
Julien Viet
2017-09-22 10:19:56 +02:00
parent a30703379a
commit e43bd70b1b
4 changed files with 54 additions and 6 deletions

View File

@@ -23,13 +23,13 @@ Runs the tests
Vert.x supports native transport on BSD and Linux, to run the tests with native transport
```
> mvn test -Dvertx.testNativeTransport=true
> mvn test -PtestNativeTransport
```
Vert.x supports domain sockets on Linux exclusively, to run the tests with domain sockets
```
> mvn test -Dvertx.testNativeTransport=true -Dtest.useDomainSockets
> mvn test -PtestDomainSockets
```
Vert.x has a few integrations tests that run a differently configured JVM (classpath, system properties, etc....)

48
pom.xml
View File

@@ -118,13 +118,11 @@
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<optional>true</optional>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<optional>true</optional>
<classifier>osx-x86_64</classifier>
</dependency>
<!-- Jackson -->
@@ -680,6 +678,52 @@
</build>
</profile>
<!-- Run tests with native transport -->
<profile>
<id>testNativeTransport</id>
<properties>
<vertx.testNativeTransport>true</vertx.testNativeTransport>
<vertx.testDomainSockets>false</vertx.testDomainSockets>
</properties>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<optional>true</optional>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<optional>true</optional>
<classifier>osx-x86_64</classifier>
</dependency>
</dependencies>
</profile>
<!-- Run tests with native transport and domain sockets -->
<profile>
<id>testDomainSockets</id>
<properties>
<vertx.testNativeTransport>true</vertx.testNativeTransport>
<vertx.testDomainSockets>true</vertx.testDomainSockets>
</properties>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<optional>true</optional>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<optional>true</optional>
<classifier>osx-x86_64</classifier>
</dependency>
</dependencies>
</profile>
<!-- Documentation generation : activate with -Pdocs -->
<profile>
<id>docs</id>

View File

@@ -1705,6 +1705,8 @@ You need to add the following dependency in your classpath:
</dependency>
----
MacOS Sierra and above are supported.
Native on BSD gives you extra networking options:
* SO_REUSEPORT

View File

@@ -174,7 +174,7 @@ can be retrieved using `link:../../apidocs/io/vertx/core/net/NetSocket.html#remo
Files and classpath resources can be written to the socket directly using `link:../../apidocs/io/vertx/core/net/NetSocket.html#sendFile-java.lang.String-[sendFile]`. This can be a very
efficient way to send files, as it can be handled by the OS kernel directly where supported by the operating system.
Please see the chapter about <<classpath, serving files from the classpath>> for restrictions of the
Please see the chapter about <<classpath, serving files from the classpath>> for restrictions of the
classpath resolution or disabling it.
[source,java]
@@ -473,7 +473,9 @@ NetServerOptions options = new NetServerOptions().
NetServer server = vertx.createNetServer(options);
----
Keep in mind that pem configuration, the private key is not crypted.
PKCS8, PKCS1 and X.509 certificates wrapped in a PEM block formats are supported.
WARNING: keep in mind that pem configuration, the private key is not crypted.
==== Specifying trust for the server