modules/core/domain/pom.xml | 26 ++++++++++ modules/core/domain/src/test/resources/arquillian.xml | 4 + modules/enterprise/server/itests-2/pom.xml | 18 ++++++ modules/enterprise/server/itests-2/src/test/resources/arquillian.xml | 4 + 4 files changed, 52 insertions(+)
New commits: commit b4522507d1a18a20cabff9cd2097c730c5d5f42e Author: Jay Shaughnessy jshaughn@redhat.com Date: Thu Feb 21 11:21:27 2013 -0500
This should allow us to run Arquillian's spawned AS7 instances (for domain and server jar itests) on non-default ports. This can be helpful in environments where you want to run multiple AS7 instances at the same time.
Arquillian will now inspect, through the AS7 management port (assumed to be on the local machine for now), to find out what ports it needs to deal with.
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml index 3eec8ad..21af6e4 100644 --- a/modules/core/domain/pom.xml +++ b/modules/core/domain/pom.xml @@ -235,6 +235,16 @@ <echo>Will now add test configuration to JBossAS config file: ${jboss.conf}</echo> <replace file="${jboss.conf}"> <replacefilter> + <replacetoken></extensions></replacetoken> + <replacevalue><![CDATA[ + </extensions> + + <!-- FOR RHQ TESTING --> + <system-properties> + <property name="jboss.socket.binding.port-offset" value="${jboss.socket.binding.port-offset}" /> + </system-properties>]]></replacevalue> + </replacefilter> + <replacefilter> <replacetoken></drivers></replacetoken> <replacevalue><![CDATA[ <!-- FOR RHQ TESTING --> @@ -681,6 +691,22 @@ <jboss.vm.args.debug>-Xrunjdwp:transport=dt_socket,address=8798,server=y,suspend=y</jboss.vm.args.debug> </properties> </profile> + + <!-- These two properties allow Arquillian to inspect AS7 through the mgmt port, to determine the ports it needs to interact + with when spawning the AS7 instance. This allows the AS7 to run on non-default ports. If these properties are not set (for + example, in settings.xml) then we must set the defaults here. The offset is then provided via the standalone.xml properties --> + <profile> + <id>arquillian-ports</id> + <activation> + <property> + <name>!jboss.socket.binding.port-offset</name> + </property> + </activation> + <properties> + <jboss.socket.binding.port-offset>0</jboss.socket.binding.port-offset> + <jboss.management.native.port>9999</jboss.management.native.port> + </properties> + </profile>
</profiles>
diff --git a/modules/core/domain/src/test/resources/arquillian.xml b/modules/core/domain/src/test/resources/arquillian.xml index 368ce23..d0744f3 100644 --- a/modules/core/domain/src/test/resources/arquillian.xml +++ b/modules/core/domain/src/test/resources/arquillian.xml @@ -21,6 +21,10 @@
<configuration> <property name="jbossHome">${jboss.unzip.location}</property> + <!-- These two properties allow Arquillian to inspect AS7 through the mgmt port, to determine the ports it needs + to interact with when spawning the AS7 instance. This allows the AS7 to run on non-default ports. --> + <property name="managementAddress">127.0.0.1</property> + <property name="managementPort">${jboss.management.native.port}</property> </configuration> </container>
diff --git a/modules/enterprise/server/itests-2/pom.xml b/modules/enterprise/server/itests-2/pom.xml index 5961627..49d79f5 100644 --- a/modules/enterprise/server/itests-2/pom.xml +++ b/modules/enterprise/server/itests-2/pom.xml @@ -91,6 +91,7 @@ <system-properties> <property name="project.version" value="${project.version}"/> <property name="rhq.server.content.filesystem" value="${jboss.unzip.location}/standalone/data/packagebits" /> + <property name="jboss.socket.binding.port-offset" value="${jboss.socket.binding.port-offset}" /> </system-properties>]]></replacevalue> </replacefilter>
@@ -741,5 +742,22 @@ <jboss.vm.args.debug>-Xrunjdwp:transport=dt_socket,address=8798,server=y,suspend=y</jboss.vm.args.debug> </properties> </profile> + + <!-- These two properties allow Arquillian to inspect AS7 through the mgmt port, to determine the ports it needs to interact + with when spawning the AS7 instance. This allows the AS7 to run on non-default ports. If these properties are not set (for + example, in settings.xml) then we must set the defaults here. The offset is then provided via the standalone.xml properties --> + <profile> + <id>arquillian-ports</id> + <activation> + <property> + <name>!jboss.socket.binding.port-offset</name> + </property> + </activation> + <properties> + <jboss.socket.binding.port-offset>0</jboss.socket.binding.port-offset> + <jboss.management.native.port>9999</jboss.management.native.port> + </properties> + </profile> + </profiles> </project> diff --git a/modules/enterprise/server/itests-2/src/test/resources/arquillian.xml b/modules/enterprise/server/itests-2/src/test/resources/arquillian.xml index 72f8bdc..ffaa79e 100644 --- a/modules/enterprise/server/itests-2/src/test/resources/arquillian.xml +++ b/modules/enterprise/server/itests-2/src/test/resources/arquillian.xml @@ -33,6 +33,10 @@ <configuration> <property name="jbossHome">${jboss.unzip.location}</property> <property name="javaVmArguments">${jboss.vm.args} ${jboss.vm.args.debug}</property> + <!-- These two properties allow Arquillian to inspect AS7 through the mgmt port, to determine the ports it needs + to interact with when spawning the AS7 instance. This allows the AS7 to run on non-default ports. --> + <property name="managementAddress">127.0.0.1</property> + <property name="managementPort">${jboss.management.native.port}</property> </configuration> </container> </arquillian>
rhq-commits@lists.fedorahosted.org