HHH-12758 Arquillian JVM configuration for integration tests is ignoring system properties

This commit is contained in:
Sanne Grinovero 2018-07-02 19:30:28 +01:00
parent c5d0bfb57d
commit a3d39bbf96
4 changed files with 24 additions and 17 deletions

View File

@ -227,6 +227,8 @@ test.dependsOn ':hibernate-orm-modules:prepareWildFlyForTests'
test { test {
systemProperty 'file.encoding', 'utf-8' systemProperty 'file.encoding', 'utf-8'
//Set the port-offset to match the offset in arquillian.xml
systemProperty 'jboss.socket.binding.port-offset', '137'
beforeTest { descriptor -> beforeTest { descriptor ->
//println "Starting test: " + descriptor //println "Starting test: " + descriptor
} }

View File

@ -2,8 +2,8 @@
<!-- <!--
~ Hibernate, Relational Persistence for Idiomatic Java ~ Hibernate, Relational Persistence for Idiomatic Java
~ ~
~ License: GNU Lesser General Public License (LGPL), version 2.1 or later ~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
~ See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html ~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
--> -->
<arquillian <arquillian
xmlns="http://jboss.org/schema/arquillian" xmlns="http://jboss.org/schema/arquillian"
@ -12,24 +12,26 @@
<defaultProtocol type="Servlet 3.0" /> <defaultProtocol type="Servlet 3.0" />
<!-- Uncomment in order to inspect deployments --> <!-- Uncomment in order to inspect deployments -->
<!-- Saves the deployment jar on the filesystem (per this path) for inspection --> <!--
<engine> <engine>
<!--<property name="deploymentExportPath">${arquillianDeploymentExportDir}</property>--> <property name="deploymentExportPath">${arquillianDeploymentExportDir}</property>
</engine> </engine>
-->
<group qualifier="Grid" default="true"> <group qualifier="Grid" default="true">
<container qualifier="container.active-1" mode="suite" default="true"> <container qualifier="container.active-1" mode="suite" default="true">
<configuration> <configuration>
<property name="jbossHome">${wildFlyInstallDir}</property> <property name="jbossHome">${wildFlyInstallDir}</property>
<!-- For Remote debugging of Wildfly add the following line to the 'javaVmArguments' section below: -->
<!-- -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y-->
<!-- DO NOT add comments within the property section below as the Arquillian parser can't deal with it -->
<!-- The port offset is defined to avoid classhing with NVidia drivers on Windows -->
<property name="javaVmArguments"> <property name="javaVmArguments">
-Dee8.preview.mode=true
-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Stack=true
-Djgroups.bind_addr=127.0.0.1 -Djgroups.bind_addr=127.0.0.1
-Djboss.socket.binding.port-offset=137 -Djboss.socket.binding.port-offset=137
-Dee8.preview.mode=true
<!-- Uncomment for Remote debugging Wildfly -->
<!-- -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y-->
</property> </property>
</configuration> </configuration>
</container> </container>

View File

@ -158,4 +158,7 @@ processTestResources {
) )
} }
test {
//Set the port-offset to match the offset in arquillian.xml
systemProperties['jboss.socket.binding.port-offset'] = 137
}

View File

@ -23,15 +23,15 @@
<container qualifier="container.active-1" mode="suite" default="true"> <container qualifier="container.active-1" mode="suite" default="true">
<configuration> <configuration>
<property name="jbossHome">${wildFlyInstallDir}</property> <property name="jbossHome">${wildFlyInstallDir}</property>
<!-- For Remote debugging of Wildfly add the following line to the 'javaVmArguments' section below: -->
<!-- -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y-->
<!-- DO NOT add comments within the property section below as the Arquillian parser can't deal with it -->
<!-- The port offset is defined to avoid classhing with NVidia drivers on Windows -->
<property name="javaVmArguments"> <property name="javaVmArguments">
-Dee8.preview.mode=true
-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Stack=true
-Djgroups.bind_addr=127.0.0.1 -Djgroups.bind_addr=127.0.0.1
-Djboss.socket.binding.port-offset=137 -Djboss.socket.binding.port-offset=137
-Dee8.preview.mode=true
<!-- Uncomment for Remote debugging Wildfly -->
<!--
-Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y
-->
</property> </property>
</configuration> </configuration>
</container> </container>