Skip to content

Commit

Permalink
WFLY-9598 Update "xsite" tests to use CLI
Browse files Browse the repository at this point in the history
* remove XSiteBackupForTestCase
  • Loading branch information
rhusar committed Jan 8, 2018
1 parent 8672020 commit 0ae7b5a
Show file tree
Hide file tree
Showing 7 changed files with 301 additions and 821 deletions.
264 changes: 1 addition & 263 deletions testsuite/integration/clustering/pom.xml
Expand Up @@ -210,268 +210,6 @@
</plugins>
</build>
</profile>

<profile>
<id>ts.clustering.xsite.profile</id>
<activation><property><name>!ts.noClustering</name></property></activation>

<!--
Server configuration executions.
-->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions combine.children="append">
<execution>
<id>ts.config-as.clustering.xsite</id>
<phase>process-test-resources</phase>
<goals><goal>run</goal></goals>
<configuration>
<target>
<echo>Creating x-site configurations</echo>
<!-- Build the UDP server configs in target/ . -->
<!-- this configuration uses one interface and port offsets -->
<ant antfile="${basedir}/../src/test/scripts/clustering-build.xml">
<property name="node0" value="${node0}"/>
<property name="node1" value="${node1}"/>
<property name="node2" value="${node2}"/>
<property name="node3" value="${node3}"/>
<property name="mcast-lon" value="${mcast}"/>
<property name="mcast-nyc" value="${mcast1}"/>
<property name="mcast-sfo" value="${mcast2}"/>
<property name="mcast-mping" value="${mcast3}"/>
<property name="mcast.ttl" value="${mcast.ttl}"/>
<target name="build-clustering-xsite"/>
</ant>
</target>
</configuration>
</execution>
</executions>
</plugin>

<!--
Surefire test executions.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions combine.children="append">

<!-- Disable default-test execution. -->
<execution>
<id>default-test</id>
<goals><goal>test</goal></goals>
<phase>none</phase>
</execution>

<!-- Single node clustering tests. -->
<execution>
<id>ts.surefire.clustering.xsite</id>
<phase>test</phase>
<goals><goal>test</goal></goals>
<configuration>
<!-- Tests to execute. -->
<includes>
<include>org/jboss/as/test/clustering/xsite/XSiteSimpleTestCase.java</include>
</includes>

<!-- Parameters to test cases. -->
<systemPropertyVariables combine.children="append">
<arquillian.launch>clustering-xsite</arquillian.launch>
<jboss.server.config.file.name>standalone-ha.xml</jboss.server.config.file.name>
<!--bit of a workaround, we don't include ${jvm.args.ip.server} as clustering does custom binding-->
<server.jvm.args>${surefire.system.args} ${jvm.args.ip} ${jvm.args.other} ${jvm.args.timeouts} -Dnode0=${node0} -Dnode1=${node1} -Dmcast=${mcast} -Dmcast.ttl=${mcast.ttl} ${jvm.args.dirs} ${extra.server.jvm.args}</server.jvm.args>
</systemPropertyVariables>
</configuration>
</execution>

</executions>
</plugin>
</plugins>
</build>
</profile>

<!-- If 4 different IP addresses for node0-4 are not available, only two IPs can be used.
Set node0/1 to one address and node2/3 to the other one.

You can ensure to execute this profile by:
Linux: -P \!ts.clustering.xsite.profile,ts.clustering.xsite.profile.simple.xsite
Windows: -P !ts.clustering.xsite.profile,ts.clustering.xsite.profile.simple.xsite
-->
<profile>
<id>ts.clustering.xsite.profile.simple.xsite</id>

<!--
Server configuration executions.
-->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions combine.children="append">
<execution>
<id>ts.config-as.clustering.xsite</id>
<phase>process-test-resources</phase>
<goals><goal>run</goal></goals>
<configuration>
<target>
<echo>Creating x-site configurations</echo>
<!-- Build the UDP server configs in target/ . -->
<!-- this configuration uses one interface and port offsets -->
<ant antfile="${basedir}/../src/test/scripts/clustering-build.xml">
<property name="node0" value="${node0}"/>
<property name="node1" value="${node0}"/>
<property name="node2" value="${node1}"/>
<property name="node3" value="${node1}"/>
<property name="mcast-lon" value="${mcast}"/>
<property name="mcast-nyc" value="${mcast1}"/>
<property name="mcast-sfo" value="${mcast2}"/>
<property name="mcast-mping" value="${mcast3}"/>
<property name="mcast.ttl" value="${mcast.ttl}"/>
<target name="build-clustering-xsite"/>
</ant>
</target>
</configuration>
</execution>
</executions>
</plugin>

<!--
Surefire test executions.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions combine.children="append">

<!-- Disable default-test execution. -->
<execution>
<id>default-test</id>
<goals><goal>test</goal></goals>
<phase>none</phase>
</execution>

<!-- Single node clustering tests. -->
<execution>
<id>ts.surefire.clustering.xsite</id>
<phase>test</phase>
<goals><goal>test</goal></goals>
<configuration>
<!-- Tests to execute. -->
<includes>
<include>org/jboss/as/test/clustering/xsite/XSiteSimpleTestCase.java</include>
</includes>

<!-- Parameters to test cases. -->
<systemPropertyVariables combine.children="append">
<arquillian.launch>clustering-xsite-simple</arquillian.launch>
<jboss.server.config.file.name>standalone-ha.xml</jboss.server.config.file.name>
<!--bit of a workaround, we don't include ${jvm.args.ip.server} as clustering does custom binding-->
<server.jvm.args>${surefire.system.args} ${jvm.args.ip} ${jvm.args.other} ${jvm.args.timeouts} -Dnode0=${node0} -Dnode1=${node1} -Dmcast=${mcast} -Dmcast.ttl=${mcast.ttl} ${jvm.args.dirs} ${extra.server.jvm.args}</server.jvm.args>
</systemPropertyVariables>
</configuration>
</execution>

</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>ts.clustering.session-db-persistence.profile</id>
<activation>
<property>
<name>ds</name>
</property>
</activation>
<properties>
<cacheLoader>binary-keyed</cacheLoader>
<cacheType>replicated</cacheType>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions combine.children="append">

<execution>
<id>ts.config-as.clustering</id>
<phase>process-test-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo>In Maven: node0: ${node0}</echo>
<echo>In Maven: node1: ${node1}</echo>
<echo>In Maven: mcast: ${mcast}</echo>
<echo>In Maven: mcast.ttl: ${mcast.ttl}</echo>
<!-- Build the TCP server configs in target/ . -->
<ant antfile="${basedir}/../src/test/scripts/clustering-build.xml">
<property name="node0" value="${node0}" /> <!-- inheritAll="true" doesn't work. -->
<property name="node1" value="${node1}" />
<property name="mcast" value="${mcast}" />
<property name="mcast.ttl" value="${mcast.ttl}"/>
<property name="cacheLoader" value="${cacheLoader}" />
<property name="cacheType" value="${cacheType}" />
<property name="mode" value="${mode}" />
<target name="build-clustering" />
</ant>
</target>
</configuration>
</execution>

</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions combine.children="append">

<!-- Disable default-test execution. -->
<execution>
<id>default-test</id>
<goals>
<goal>test</goal>
</goals>
<phase>none</phase>
</execution>

<!-- Session persistence tests. -->
<execution>
<id>ts.surefire.session.persistence</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<!-- Tests to execute. -->
<includes>
<include>org/jboss/as/test/clustering/cluster/session/persistence/*TestCase.java</include>
</includes>

<!-- Parameters to test cases. -->
<systemPropertyVariables>
<arquillian.launch>clustering-all</arquillian.launch>
<jboss.server.config.file.name>standalone-ha.xml</jboss.server.config.file.name>
<stack>tcp</stack>
</systemPropertyVariables>
</configuration>
</execution>

</executions>
</plugin>
</plugins>
</build>
</profile>

<!-- Enable using -Dts.noClustering. -->
<profile>
<id>ts.clustering.do-nothing.profile</id>
Expand Down Expand Up @@ -499,6 +237,6 @@
</plugins>
</build>
</profile>

</profiles>
</project>

0 comments on commit 0ae7b5a

Please sign in to comment.