Skip to content

Commit

Permalink
Add maven profile to run tests with -Dio.netty.noUnsafe=true
Browse files Browse the repository at this point in the history
Motivation:

We had reports of failures before when sun.misc.Unsafe was not present. We should run our tests also with it disable to ensure everything works even if sun.misc.Unsafe is not present on the system.

Modifications:

Add a new profile which allows to run tests without Unsafe (using -PnoUnsafe)

Result:

Better testing of netty for systems where sun.misc.Unsafe is not present.
  • Loading branch information
normanmaurer committed Feb 6, 2016
1 parent 29ab4bf commit 8a5a934
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@
<argLine.leak>-Dio.netty.leakDetectionLevel=paranoid</argLine.leak>
</properties>
</profile>
<profile>
<id>noUnsafe</id>
<properties>
<argLine.noUnsafe>-Dio.netty.noUnsafe</argLine.noUnsafe>
</properties>
</profile>
<profile>
<id>coverage</id>
<properties>
Expand Down Expand Up @@ -211,6 +217,7 @@
<!-- Default to ALPN. See forcenpn profile to force NPN -->
<argLine.alpnAgent>-javaagent:${jetty.alpnAgent.path}=${jetty.alpnAgent.option}</argLine.alpnAgent>
<argLine.leak>-D_</argLine.leak> <!-- Overridden when 'leak' profile is active -->
<argLine.noUnsafe>-D_</argLine.noUnsafe> <!-- Overridden when 'noUnsafe' profile is active -->
<argLine.coverage>-D_</argLine.coverage> <!-- Overridden when 'coverage' profile is active -->
<!-- Configure the os-maven-plugin extension to expand the classifier on -->
<!-- Fedora-"like" systems. This is currently only used for the netty-tcnative dependency -->
Expand Down Expand Up @@ -681,7 +688,7 @@
<exclude>**/TestUtil*</exclude>
</excludes>
<runOrder>random</runOrder>
<argLine>${argLine.common} ${argLine.alpnAgent} ${argLine.leak} ${argLine.coverage}</argLine>
<argLine>${argLine.common} ${argLine.alpnAgent} ${argLine.leak} ${argLine.coverage} ${argLine.noUnsafe}</argLine>
</configuration>
</plugin>
<!-- always produce osgi bundles -->
Expand Down

0 comments on commit 8a5a934

Please sign in to comment.