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 {
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 ->
//println "Starting test: " + descriptor
}

View File

@ -2,34 +2,36 @@
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
~ 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
~ 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>.
-->
<arquillian
xmlns="http://jboss.org/schema/arquillian"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
xmlns="http://jboss.org/schema/arquillian"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<defaultProtocol type="Servlet 3.0" />
<!-- Uncomment in order to inspect deployments -->
<!-- Saves the deployment jar on the filesystem (per this path) for inspection -->
<!--
<engine>
<!--<property name="deploymentExportPath">${arquillianDeploymentExportDir}</property>-->
<property name="deploymentExportPath">${arquillianDeploymentExportDir}</property>
</engine>
-->
<group qualifier="Grid" default="true">
<container qualifier="container.active-1" mode="suite" default="true">
<configuration>
<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">
-Dee8.preview.mode=true
-Djava.net.preferIPv4Stack=true
-Djgroups.bind_addr=127.0.0.1
-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>
</configuration>
</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">
<configuration>
<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">
-Dee8.preview.mode=true
-Djava.net.preferIPv4Stack=true
-Djgroups.bind_addr=127.0.0.1
-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>
</configuration>
</container>