Fixes for compilation and running tests with UnsafeBuffer implementation

This commit is contained in:
Chris Vest 2021-05-26 18:31:28 +02:00
parent f0ee2e1467
commit b8cfd0768e
3 changed files with 97 additions and 93 deletions

View File

@ -61,10 +61,6 @@
<compilerArgument>-Xlint:-options</compilerArgument>
<meminitial>256m</meminitial>
<maxmem>1024m</maxmem>
<compilerArgs>
<arg>--add-modules</arg>
<arg>jdk.incubator.foreign</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>

View File

@ -30,6 +30,103 @@
<name>Netty/Incubator/Buffer Tests</name>
<packaging>jar</packaging>
<properties>
<surefire.version>3.0.0-M5</surefire.version>
<skipTests>false</skipTests>
<argLine.common>
-XX:+HeapDumpOnOutOfMemoryError
-Xmx2g
-Dio.netty.tryReflectionSetAccessible=true
--add-opens java.base/java.nio=io.netty.common
</argLine.common>
<argLine.mod/>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<includes>
<include>**/*Test*.java</include>
</includes>
<argLine>${argLine.common} ${argLine.mod}</argLine>
<!-- Ensure the whole stacktrace is preserved when an exception is thrown. See https://issues.apache.org/jira/browse/SUREFIRE-1457 -->
<trimStackTrace>false</trimStackTrace>
<forkedProcessExitTimeoutInSeconds>600</forkedProcessExitTimeoutInSeconds>
<!-- Not reusing forks lets us be more frugal with memory. We have a lot of tests, and they need a lot of metadata -->
<reuseForks>false</reuseForks>
<forkCount>1C</forkCount>
<systemProperties>
<sample>nosample</sample>
</systemProperties>
</configuration>
<dependencies>
<!-- Declare the surefire dynamic dependencies explicitly, to speed up the docker build. -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit-platform</artifactId>
<version>${surefire.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.3.2</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.3.2</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.28.2</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-reflect</artifactId>
<version>2.0.5</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.9.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<version>1.4</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>io.netty.incubator</groupId>

89
pom.xml
View File

@ -75,15 +75,6 @@
<!-- Java version actually used to perform the build; compiling and testing. -->
<java.version>11</java.version>
<junit.version>5.7.0</junit.version>
<surefire.version>3.0.0-M5</surefire.version>
<skipTests>false</skipTests>
<argLine.common>
-XX:+HeapDumpOnOutOfMemoryError
-Xmx2g
-Dio.netty.tryReflectionSetAccessible=true
--add-opens java.base/java.nio=io.netty.common
</argLine.common>
<argLine.mod/>
</properties>
<modules>
@ -192,86 +183,6 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<includes>
<include>**/*Test*.java</include>
</includes>
<argLine>${argLine.common} ${argLine.mod}</argLine>
<!-- Ensure the whole stacktrace is preserved when an exception is thrown. See https://issues.apache.org/jira/browse/SUREFIRE-1457 -->
<trimStackTrace>false</trimStackTrace>
<forkedProcessExitTimeoutInSeconds>600</forkedProcessExitTimeoutInSeconds>
<!-- Not reusing forks lets us be more frugal with memory. We have a lot of tests, and they need a lot of metadata -->
<reuseForks>false</reuseForks>
<forkCount>1C</forkCount>
<systemProperties>
<sample>nosample</sample>
</systemProperties>
</configuration>
<dependencies>
<!-- Declare the surefire dynamic dependencies explicitly, to speed up the docker build. -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit-platform</artifactId>
<version>${surefire.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.3.2</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.3.2</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.28.2</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-reflect</artifactId>
<version>2.0.5</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.9.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<version>1.4</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>
<!-- always produce osgi bundles -->
<plugin>
<groupId>org.apache.felix</groupId>