diff --git a/testsuite/integration/clustering/pom.xml b/testsuite/integration/clustering/pom.xml index 09cecb914501..88778172c50b 100644 --- a/testsuite/integration/clustering/pom.xml +++ b/testsuite/integration/clustering/pom.xml @@ -112,6 +112,7 @@ to the includes in the following execution. --> ${test-group}/dispatcher/**/*TestCase.java + ${test-group}/ejb/forwarding/**/*TestCase.java ${test-group}/ejb/remote/**/*TestCase.java ${test-group}/ejb2/**/*TestCase.java ${test-group}/provider/**/*TestCase.java @@ -147,6 +148,7 @@ false ${test-group}/dispatcher/**/*TestCase.java + ${test-group}/ejb/forwarding/**/*TestCase.java ${test-group}/ejb/remote/**/*TestCase.java ${test-group}/ejb2/**/*TestCase.java ${test-group}/provider/**/*TestCase.java @@ -379,93 +381,6 @@ - - ts.clustering.two.clusters.profile - - - !ts.noClustering - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - ts.config-as.clustering.two.clusters - process-test-resources - run - - - Creating two clusters configurations - - - - - - - - - - - - - - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - - default-test - test - none - - - - - ts.surefire.clustering.two.clusters - test - test - - - false - - - - org/jboss/as/test/clustering/twoclusters/**/*TestCase.java - - - - - clustering-two-clusters - standalone-ha.xml - - ${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} - udp - - - - - - - - - - - - ts.clustering.session-db-persistence.profile diff --git a/testsuite/integration/clustering/src/test/config/arq/arquillian.xml b/testsuite/integration/clustering/src/test/config/arq/arquillian.xml index daa8c08763c3..6022803b4566 100644 --- a/testsuite/integration/clustering/src/test/config/arq/arquillian.xml +++ b/testsuite/integration/clustering/src/test/config/arq/arquillian.xml @@ -338,63 +338,4 @@ - - - - - - ${basedir}/target/wildfly-clusterA-node0 - ${server.jvm.args} -Djboss.inst=${basedir}/target/wildfly-clusterA-node0 -Djboss.node.name=clusterA-node0 - ${jboss.server.config.file.name} - ${jboss.args} - ${node0} - ${as.managementPort:9990} - - ${as.debug.port:8787} ${as.managementPort:9999} - 8 - - - - - - ${basedir}/target/wildfly-clusterA-node1 - ${server.jvm.args} -Djboss.inst=${basedir}/target/wildfly-clusterA-node1 -Djboss.node.name=clusterA-node1 -Djboss.socket.binding.port-offset=100 - ${jboss.server.config.file.name} - ${jboss.args} - ${node1} - 10090 - - ${as.debug.port.node1} 10099 - 8 - - - - - - ${basedir}/target/wildfly-clusterB-node0 - ${server.jvm.args} -Djboss.inst=${basedir}/target/wildfly-clusterB-node0 -Djboss.node.name=clusterB-node0 -Djboss.socket.binding.port-offset=200 - ${jboss.server.config.file.name} - ${jboss.args} - ${node2} - 10190 - - ${as.debug.port.node2} 10199 - 8 - - - - - - ${basedir}/target/wildfly-clusterB-node1 - ${server.jvm.args} -Djboss.inst=${basedir}/target/wildfly-clusterB-node1 -Djboss.node.name=clusterB-node1 -Djboss.socket.binding.port-offset=300 - ${jboss.server.config.file.name} - ${jboss.args} - ${node3} - 10290 - - ${as.debug.port.node3} 10299 - 8 - - - diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/CLIBatchServerSetupTask.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/CLIBatchServerSetupTask.java index 589c878e5625..6785ba42f793 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/CLIBatchServerSetupTask.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/CLIBatchServerSetupTask.java @@ -31,6 +31,7 @@ import org.jboss.as.cli.batch.Batch; import org.jboss.as.test.integration.management.util.CLITestUtil; import org.jboss.dmr.ModelNode; +import org.jboss.logging.Logger; /** * Implementation of {@link ServerSetupTask} which runs provided CLI commands. @@ -39,6 +40,7 @@ */ public class CLIBatchServerSetupTask implements ServerSetupTask { + private static final Logger LOG = Logger.getLogger(CLIBatchServerSetupTask.class); private final List nodes; private final List setupCommands; private final List tearDownCommands; @@ -51,6 +53,14 @@ public CLIBatchServerSetupTask(String[] nodes, String[] setupCommands, String[] this(nodes == null ? null : Arrays.asList(nodes), Arrays.asList(setupCommands), Arrays.asList(tearDownCommands)); } + /** + * Constructs a {@link ServerSetupTask} which is run after the container is started and before the deployment is deployed and its + * corresponding tear down commands run after undeployment. + * + * @param nodes list of nodes to run the commands on used to run specific setup on concrete nodes; {@code null} to run on all + * @param setupCommands list of CLI commands to run on container setup + * @param tearDownCommands list of CLI commands to run on container tear down, specifically undoing all changes done in setup commands + */ public CLIBatchServerSetupTask(List nodes, List setupCommands, List tearDownCommands) { this.nodes = nodes; this.setupCommands = setupCommands; diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/AbstractClusteringTestCase.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/AbstractClusteringTestCase.java index 7cb1d0b18ce9..f2ead93a4fb0 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/AbstractClusteringTestCase.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/AbstractClusteringTestCase.java @@ -40,16 +40,16 @@ import org.junit.Before; /** - * Base cluster test that guarantees a framework contract as follows: - *
    + * Base implementation for every clustering test which guarantees a framework contract as follows: + *
      + *
    1. test case is constructed specifying nodes and deployments required
    2. *
    3. before every test method, containers are started and deployments are deployed via {@link #beforeTestMethod()}
    4. *
    5. after every method execution the deployments are undeployed via {@link #afterTestMethod()}
    6. - *
- * - * Should the test demand different node/deployment setup, the methods must be overridden. - * - * Furthermore provides convenience methods for {@link NodeUtil} utility ({@link #start(String...)}, - * {@link #deploy(String...)}, etc). + * + * Should the test demand different node and deployment handling, the methods must be overridden. + *

+ * Furthermore, this base class provides common constants for node/instance-id, deployment/deployment helpers, timeouts and provides + * convenience methods for managing container and deployment lifecycle ({@link #start(String...)}, {@link #deploy(String...)}, etc). * * @author Radoslav Husar */ @@ -68,10 +68,10 @@ public abstract class AbstractClusteringTestCase { public static final String NODE_NAME_PROPERTY = "jboss.node.name"; // Test deployment names - public static final String DEPLOYMENT_1 = "deployment-0"; - public static final String DEPLOYMENT_2 = "deployment-1"; - public static final String DEPLOYMENT_3 = "deployment-2"; - public static final String DEPLOYMENT_4 = "deployment-3"; + public static final String DEPLOYMENT_1 = "deployment-1"; + public static final String DEPLOYMENT_2 = "deployment-2"; + public static final String DEPLOYMENT_3 = "deployment-3"; + public static final String DEPLOYMENT_4 = "deployment-4"; public static final String[] TWO_DEPLOYMENTS = new String[] { DEPLOYMENT_1, DEPLOYMENT_2 }; public static final String[] FOUR_DEPLOYMENTS = new String[] {DEPLOYMENT_1, DEPLOYMENT_2, DEPLOYMENT_3, DEPLOYMENT_4 }; @@ -91,10 +91,14 @@ public abstract class AbstractClusteringTestCase { public static final int HTTP_REQUEST_WAIT_TIME_S = TimeoutUtil.adjust(5); // System Properties - public static final String MCAST = System.getProperty("mcast", "230.0.0.4"); - public static final String MCAST1 = System.getProperty("mcast1", "230.0.0.5"); - public static final String MCAST2 = System.getProperty("mcast2", "230.0.0.6"); - public static final String MCAST3 = System.getProperty("mcast3", "230.0.0.7"); + public static final String TESTSUITE_NODE0 = System.getProperty("node0", "127.0.0.1"); + public static final String TESTSUITE_NODE1 = System.getProperty("node1", "127.0.0.1"); + public static final String TESTSUITE_NODE2 = System.getProperty("node2", "127.0.0.1"); + public static final String TESTSUITE_NODE3 = System.getProperty("node3", "127.0.0.1"); + public static final String TESTSUITE_MCAST = System.getProperty("mcast", "230.0.0.4"); + public static final String TESTSUITE_MCAST1 = System.getProperty("mcast1", "230.0.0.5"); + public static final String TESTSUITE_MCAST2 = System.getProperty("mcast2", "230.0.0.6"); + public static final String TESTSUITE_MCAST3 = System.getProperty("mcast3", "230.0.0.7"); protected static final Logger log = Logger.getLogger(AbstractClusteringTestCase.class); private static final RoutingSupport routing = new SimpleRoutingSupport(); diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/AbstractRemoteEJBTwoClusterTestCase.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/AbstractRemoteEJBForwardingTestCase.java similarity index 73% rename from testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/AbstractRemoteEJBTwoClusterTestCase.java rename to testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/AbstractRemoteEJBForwardingTestCase.java index d7eff56ef7e0..4deadd5ce630 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/AbstractRemoteEJBTwoClusterTestCase.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/AbstractRemoteEJBForwardingTestCase.java @@ -1,6 +1,6 @@ /* * JBoss, Home of Professional Open Source. - * Copyright 2017, Red Hat Middleware LLC, and individual contributors + * Copyright 2017, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * @@ -20,7 +20,7 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.as.test.clustering.twoclusters; +package org.jboss.as.test.clustering.cluster.ejb.forwarding; import static org.jboss.as.test.shared.IntermittentFailure.thisTestIsFailingIntermittently; import static org.junit.Assert.fail; @@ -35,11 +35,13 @@ import org.jboss.arquillian.container.test.api.RunAsClient; import org.jboss.arquillian.container.test.api.TargetsContainer; import org.jboss.arquillian.junit.Arquillian; +import org.jboss.as.arquillian.api.ServerSetup; +import org.jboss.as.test.clustering.CLIBatchServerSetupTask; import org.jboss.as.test.clustering.cluster.AbstractClusteringTestCase; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.stateful.RemoteStatefulSB; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.common.CommonStatefulSB; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.forwarding.AbstractForwardingStatefulSBImpl; import org.jboss.as.test.clustering.ejb.EJBDirectory; -import org.jboss.as.test.clustering.twoclusters.bean.common.CommonStatefulSB; -import org.jboss.as.test.clustering.twoclusters.bean.forwarding.AbstractForwardingStatefulSBImpl; -import org.jboss.as.test.clustering.twoclusters.bean.stateful.RemoteStatefulSB; import org.jboss.as.test.shared.TimeoutUtil; import org.jboss.logging.Logger; import org.jboss.shrinkwrap.api.Archive; @@ -68,7 +70,8 @@ */ @RunWith(Arquillian.class) @RunAsClient -public abstract class AbstractRemoteEJBTwoClusterTestCase extends AbstractClusteringTestCase { +@ServerSetup({AbstractRemoteEJBForwardingTestCase.ClusterAServerSetup.class, AbstractRemoteEJBForwardingTestCase.ClusterBServerSetup.class}) +public abstract class AbstractRemoteEJBForwardingTestCase extends AbstractClusteringTestCase { @BeforeClass public static void beforeClass() { @@ -77,14 +80,14 @@ public static void beforeClass() { private static long FAILURE_FREE_TIME = TimeoutUtil.adjust(5000); private static long SERVER_DOWN_TIME = TimeoutUtil.adjust(5000); - private static long INVOCATION_WAIT = TimeoutUtil.adjust(100); + private static long INVOCATION_WAIT = TimeoutUtil.adjust(1000); private final ExceptionSupplier directorySupplier; private final String implementationClass; - private static final Logger logger = Logger.getLogger(AbstractRemoteEJBTwoClusterTestCase.class); + private static final Logger logger = Logger.getLogger(AbstractRemoteEJBForwardingTestCase.class); - AbstractRemoteEJBTwoClusterTestCase(ExceptionSupplier directorySupplier, String implementationClass) { + AbstractRemoteEJBForwardingTestCase(ExceptionSupplier directorySupplier, String implementationClass) { super(FOUR_NODES); this.directorySupplier = directorySupplier; @@ -93,13 +96,13 @@ public static void beforeClass() { @Deployment(name = DEPLOYMENT_3, managed = false, testable = false) @TargetsContainer(NODE_3) - public static Archive deployment2() { + public static Archive deployment3() { return createNonForwardingDeployment(); } @Deployment(name = DEPLOYMENT_4, managed = false, testable = false) @TargetsContainer(NODE_4) - public static Archive deployment3() { + public static Archive deployment4() { return createNonForwardingDeployment(); } @@ -196,7 +199,7 @@ private class ClientInvocationTask implements Runnable { /** * Asserts that there were no exception during the last test period. */ - void assertNoExceptions(String when) throws Exception { + void assertNoExceptions(String when) { if (firstException != null) { logger.error(firstException); fail("Client threw an exception " + when + ": " + firstException); // Arrays.stream(firstException.getStackTrace()).map(StackTraceElement::toString).collect(Collectors.joining("\n"))); @@ -222,4 +225,34 @@ public void run() { } } } + + public static class ClusterAServerSetup extends CLIBatchServerSetupTask { + public ClusterAServerSetup() { + super(new String[]{NODE_1, NODE_2}, + new String[]{ + "/subsystem=jgroups/channel=ee:write-attribute(name=cluster,value=ejb-forwarder)", + String.format("/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=binding-remote-ejb-connection:add(host=%s,port=8280)", TESTSUITE_NODE3), + "/core-service=management/security-realm=PasswordRealm:add", + "/core-service=management/security-realm=PasswordRealm/server-identity=secret:add(value=\"cmVtQHRlZWpicGFzc3dkMQ==\")", + "/subsystem=remoting/remote-outbound-connection=remote-ejb-connection:add(outbound-socket-binding-ref=binding-remote-ejb-connection,protocol=http-remoting,security-realm=PasswordRealm,username=remoteejbuser)", + }, + new String[]{ + "/subsystem=remoting/remote-outbound-connection=remote-ejb-connection:remove", + "/core-service=management/security-realm=PasswordRealm:remove", + "/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=binding-remote-ejb-connection:remove", + "/subsystem=jgroups/channel=ee:write-attribute(name=cluster,value=ejb)", + }); + } + } + + public static class ClusterBServerSetup extends CLIBatchServerSetupTask { + public ClusterBServerSetup() { + super(new String[]{NODE_3, NODE_4}, + new String[]{ + String.format("/socket-binding-group=standard-sockets/socket-binding=jgroups-mping:write-attribute(name=multicast-address,value=%s)", TESTSUITE_MCAST1), + }, new String[]{ + "/socket-binding-group=standard-sockets/socket-binding=jgroups-mping:write-attribute(name=multicast-address,value=\"${jboss.default.multicast.address:230.0.0.4}\"", + }); + } + } } \ No newline at end of file diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/NonTxClientEJBTwoClusterTestCase.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/NonTxClientEJBForwardingTestCase.java similarity index 86% rename from testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/NonTxClientEJBTwoClusterTestCase.java rename to testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/NonTxClientEJBForwardingTestCase.java index db1de8b69f83..5b10f558d1d1 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/NonTxClientEJBTwoClusterTestCase.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/NonTxClientEJBForwardingTestCase.java @@ -20,7 +20,7 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.as.test.clustering.twoclusters; +package org.jboss.as.test.clustering.cluster.ejb.forwarding; import org.jboss.as.test.clustering.ejb.ClientEJBDirectory; @@ -29,9 +29,9 @@ * * @author Radoslav Husar */ -public class NonTxClientEJBTwoClusterTestCase extends NonTxRemoteEJBTwoClusterTestCase { +public class NonTxClientEJBForwardingTestCase extends NonTxRemoteEJBForwardingTestCase { - public NonTxClientEJBTwoClusterTestCase() { + public NonTxClientEJBForwardingTestCase() { super(() -> new ClientEJBDirectory(MODULE_NAME)); } } diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/NonTxRemoteEJBTwoClusterTestCase.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/NonTxRemoteEJBForwardingTestCase.java similarity index 77% rename from testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/NonTxRemoteEJBTwoClusterTestCase.java rename to testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/NonTxRemoteEJBForwardingTestCase.java index de9618f33e10..5bb1c8c85762 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/NonTxRemoteEJBTwoClusterTestCase.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/NonTxRemoteEJBForwardingTestCase.java @@ -20,19 +20,19 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.as.test.clustering.twoclusters; +package org.jboss.as.test.clustering.cluster.ejb.forwarding; import javax.naming.NamingException; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.TargetsContainer; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.common.CommonStatefulSB; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.forwarding.AbstractForwardingStatefulSBImpl; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.forwarding.NonTxForwardingStatefulSBImpl; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.stateful.RemoteStatefulSB; import org.jboss.as.test.clustering.ejb.EJBDirectory; import org.jboss.as.test.clustering.ejb.NamingEJBDirectory; import org.jboss.as.test.clustering.ejb.RemoteEJBDirectory; -import org.jboss.as.test.clustering.twoclusters.bean.common.CommonStatefulSB; -import org.jboss.as.test.clustering.twoclusters.bean.forwarding.AbstractForwardingStatefulSBImpl; -import org.jboss.as.test.clustering.twoclusters.bean.forwarding.NonTxForwardingStatefulSBImpl; -import org.jboss.as.test.clustering.twoclusters.bean.stateful.RemoteStatefulSB; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.JavaArchive; @@ -43,27 +43,27 @@ * * @author Radoslav Husar */ -public class NonTxRemoteEJBTwoClusterTestCase extends AbstractRemoteEJBTwoClusterTestCase { +public class NonTxRemoteEJBForwardingTestCase extends AbstractRemoteEJBForwardingTestCase { - public static final String MODULE_NAME = "twocluster-forwarder-nontx"; + public static final String MODULE_NAME = "forwarder-nontx"; - public NonTxRemoteEJBTwoClusterTestCase() { + public NonTxRemoteEJBForwardingTestCase() { this(() -> new RemoteEJBDirectory(MODULE_NAME)); } - NonTxRemoteEJBTwoClusterTestCase(ExceptionSupplier directorySupplier) { + NonTxRemoteEJBForwardingTestCase(ExceptionSupplier directorySupplier) { super(directorySupplier, NonTxForwardingStatefulSBImpl.class.getSimpleName()); } @Deployment(name = DEPLOYMENT_1, managed = false, testable = false) @TargetsContainer(NODE_1) - public static Archive deployment0() { + public static Archive deployment1() { return createForwardingDeployment(); } @Deployment(name = DEPLOYMENT_2, managed = false, testable = false) @TargetsContainer(NODE_2) - public static Archive deployment1() { + public static Archive deployment2() { return createForwardingDeployment(); } @@ -76,7 +76,7 @@ private static Archive createForwardingDeployment() { ejbJar.addClass(NonTxForwardingStatefulSBImpl.class); ejbJar.addClasses(EJBDirectory.class, NamingEJBDirectory.class, RemoteEJBDirectory.class); // remote outbound connection configuration - ejbJar.addAsManifestResource(AbstractRemoteEJBTwoClusterTestCase.class.getPackage(), "jboss-ejb-client.xml", "jboss-ejb-client.xml"); + ejbJar.addAsManifestResource(AbstractRemoteEJBForwardingTestCase.class.getPackage(), "jboss-ejb-client.xml", "jboss-ejb-client.xml"); return ejbJar; } } diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/TxClientEJBTwoClusterTestCase.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/TxClientEJBForwardingTestCase.java similarity index 87% rename from testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/TxClientEJBTwoClusterTestCase.java rename to testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/TxClientEJBForwardingTestCase.java index d74d4f3afb51..43ec3566d7ba 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/TxClientEJBTwoClusterTestCase.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/TxClientEJBForwardingTestCase.java @@ -20,7 +20,7 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.as.test.clustering.twoclusters; +package org.jboss.as.test.clustering.cluster.ejb.forwarding; import org.jboss.as.test.clustering.ejb.ClientEJBDirectory; @@ -29,9 +29,9 @@ * * @author Radoslav Husar */ -public class TxClientEJBTwoClusterTestCase extends TxRemoteEJBTwoClusterTestCase { +public class TxClientEJBForwardingTestCase extends TxRemoteEJBForwardingTestCase { - public TxClientEJBTwoClusterTestCase() { + public TxClientEJBForwardingTestCase() { super(() -> new ClientEJBDirectory(MODULE_NAME)); } } diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/TxRemoteEJBTwoClusterTestCase.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/TxRemoteEJBForwardingTestCase.java similarity index 77% rename from testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/TxRemoteEJBTwoClusterTestCase.java rename to testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/TxRemoteEJBForwardingTestCase.java index a44692438b57..2e29d4cab442 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/TxRemoteEJBTwoClusterTestCase.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/TxRemoteEJBForwardingTestCase.java @@ -1,6 +1,6 @@ /* * JBoss, Home of Professional Open Source. - * Copyright 2017, Red Hat Middleware LLC, and individual contributors + * Copyright 2017, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * @@ -20,7 +20,7 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.as.test.clustering.twoclusters; +package org.jboss.as.test.clustering.cluster.ejb.forwarding; import javax.naming.NamingException; @@ -29,10 +29,10 @@ import org.jboss.as.test.clustering.ejb.EJBDirectory; import org.jboss.as.test.clustering.ejb.NamingEJBDirectory; import org.jboss.as.test.clustering.ejb.RemoteEJBDirectory; -import org.jboss.as.test.clustering.twoclusters.bean.common.CommonStatefulSB; -import org.jboss.as.test.clustering.twoclusters.bean.forwarding.AbstractForwardingStatefulSBImpl; -import org.jboss.as.test.clustering.twoclusters.bean.forwarding.ForwardingStatefulSBImpl; -import org.jboss.as.test.clustering.twoclusters.bean.stateful.RemoteStatefulSB; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.common.CommonStatefulSB; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.forwarding.AbstractForwardingStatefulSBImpl; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.forwarding.ForwardingStatefulSBImpl; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.stateful.RemoteStatefulSB; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.JavaArchive; @@ -43,15 +43,15 @@ * * @author Radoslav Husar */ -public class TxRemoteEJBTwoClusterTestCase extends AbstractRemoteEJBTwoClusterTestCase { +public class TxRemoteEJBForwardingTestCase extends AbstractRemoteEJBForwardingTestCase { - public static final String MODULE_NAME = "twocluster-forwarder-tx"; + public static final String MODULE_NAME = "forwarder-tx"; - public TxRemoteEJBTwoClusterTestCase() { + public TxRemoteEJBForwardingTestCase() { this(() -> new RemoteEJBDirectory(MODULE_NAME)); } - TxRemoteEJBTwoClusterTestCase(ExceptionSupplier directorySupplier) { + TxRemoteEJBForwardingTestCase(ExceptionSupplier directorySupplier) { super(directorySupplier, ForwardingStatefulSBImpl.class.getSimpleName()); } @@ -76,7 +76,7 @@ private static Archive createForwardingDeployment() { ejbJar.addClass(ForwardingStatefulSBImpl.class); ejbJar.addClasses(EJBDirectory.class, NamingEJBDirectory.class, RemoteEJBDirectory.class); // remote outbound connection configuration - ejbJar.addAsManifestResource(AbstractRemoteEJBTwoClusterTestCase.class.getPackage(), "jboss-ejb-client.xml", "jboss-ejb-client.xml"); + ejbJar.addAsManifestResource(AbstractRemoteEJBForwardingTestCase.class.getPackage(), "jboss-ejb-client.xml", "jboss-ejb-client.xml"); return ejbJar; } } diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/common/CommonStatefulSB.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/common/CommonStatefulSB.java similarity index 88% rename from testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/common/CommonStatefulSB.java rename to testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/common/CommonStatefulSB.java index b01ef8cf4a0f..437d11720d31 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/common/CommonStatefulSB.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/common/CommonStatefulSB.java @@ -1,6 +1,6 @@ /* * JBoss, Home of Professional Open Source. - * Copyright 2017, Red Hat Middleware LLC, and individual contributors + * Copyright 2017, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * @@ -20,7 +20,7 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.as.test.clustering.twoclusters.bean.common; +package org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.common; public interface CommonStatefulSB { diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/common/CommonStatefulSBImpl.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/common/CommonStatefulSBImpl.java similarity index 93% rename from testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/common/CommonStatefulSBImpl.java rename to testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/common/CommonStatefulSBImpl.java index 4fae9e42caff..d94acb9c1ff1 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/common/CommonStatefulSBImpl.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/common/CommonStatefulSBImpl.java @@ -1,6 +1,6 @@ /* * JBoss, Home of Professional Open Source. - * Copyright 2017, Red Hat Middleware LLC, and individual contributors + * Copyright 2017, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * @@ -20,7 +20,7 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.as.test.clustering.twoclusters.bean.common; +package org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.common; import javax.annotation.PostConstruct; import javax.ejb.Remove; diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/forwarding/AbstractForwardingStatefulSBImpl.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/forwarding/AbstractForwardingStatefulSBImpl.java similarity index 88% rename from testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/forwarding/AbstractForwardingStatefulSBImpl.java rename to testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/forwarding/AbstractForwardingStatefulSBImpl.java index 9d370e84f013..d25d0f15a475 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/forwarding/AbstractForwardingStatefulSBImpl.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/forwarding/AbstractForwardingStatefulSBImpl.java @@ -1,6 +1,6 @@ /* * JBoss, Home of Professional Open Source. - * Copyright 2017, Red Hat Middleware LLC, and individual contributors + * Copyright 2017, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * @@ -20,14 +20,14 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.as.test.clustering.twoclusters.bean.forwarding; +package org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.forwarding; import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.stateful.RemoteStatefulSB; import org.jboss.as.test.clustering.ejb.EJBDirectory; import org.jboss.as.test.clustering.ejb.RemoteEJBDirectory; -import org.jboss.as.test.clustering.twoclusters.bean.stateful.RemoteStatefulSB; import org.jboss.logging.Logger; /** @@ -37,7 +37,7 @@ public abstract class AbstractForwardingStatefulSBImpl { private static final Logger log = Logger.getLogger(AbstractForwardingStatefulSBImpl.class.getName()); - public static final String MODULE_NAME = "twocluster-terminus"; + public static final String MODULE_NAME = "terminus"; private RemoteStatefulSB bean; diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/forwarding/ForwardingStatefulSBImpl.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/forwarding/ForwardingStatefulSBImpl.java similarity index 86% rename from testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/forwarding/ForwardingStatefulSBImpl.java rename to testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/forwarding/ForwardingStatefulSBImpl.java index 111e1288e149..394eed6aff10 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/forwarding/ForwardingStatefulSBImpl.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/forwarding/ForwardingStatefulSBImpl.java @@ -1,6 +1,6 @@ /* * JBoss, Home of Professional Open Source. - * Copyright 2017, Red Hat Middleware LLC, and individual contributors + * Copyright 2017, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * @@ -20,13 +20,13 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.as.test.clustering.twoclusters.bean.forwarding; +package org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.forwarding; import javax.ejb.Stateful; import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; -import org.jboss.as.test.clustering.twoclusters.bean.stateful.RemoteStatefulSB; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.stateful.RemoteStatefulSB; @Stateful @TransactionAttribute(TransactionAttributeType.REQUIRED) // this is the default anyway diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/forwarding/NonTxForwardingStatefulSBImpl.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/forwarding/NonTxForwardingStatefulSBImpl.java similarity index 84% rename from testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/forwarding/NonTxForwardingStatefulSBImpl.java rename to testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/forwarding/NonTxForwardingStatefulSBImpl.java index 27d72d62ef89..5f36493ed274 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/forwarding/NonTxForwardingStatefulSBImpl.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/forwarding/NonTxForwardingStatefulSBImpl.java @@ -1,6 +1,6 @@ /* * JBoss, Home of Professional Open Source. - * Copyright 2017, Red Hat Middleware LLC, and individual contributors + * Copyright 2017, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * @@ -20,13 +20,13 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.as.test.clustering.twoclusters.bean.forwarding; +package org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.forwarding; import javax.ejb.Stateful; import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; -import org.jboss.as.test.clustering.twoclusters.bean.stateful.RemoteStatefulSB; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.stateful.RemoteStatefulSB; @Stateful @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/stateful/RemoteStatefulSB.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/stateful/RemoteStatefulSB.java similarity index 84% rename from testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/stateful/RemoteStatefulSB.java rename to testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/stateful/RemoteStatefulSB.java index 68842cb70799..1644c0f291a5 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/stateful/RemoteStatefulSB.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/stateful/RemoteStatefulSB.java @@ -1,6 +1,6 @@ /* * JBoss, Home of Professional Open Source. - * Copyright 2017, Red Hat Middleware LLC, and individual contributors + * Copyright 2017, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * @@ -20,9 +20,9 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.as.test.clustering.twoclusters.bean.stateful; +package org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.stateful; -import org.jboss.as.test.clustering.twoclusters.bean.common.CommonStatefulSB; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.common.CommonStatefulSB; import javax.ejb.Remote; diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/stateful/RemoteStatefulSBImpl.java b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/stateful/RemoteStatefulSBImpl.java similarity index 83% rename from testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/stateful/RemoteStatefulSBImpl.java rename to testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/stateful/RemoteStatefulSBImpl.java index dbd34114886f..92517f1ffc91 100644 --- a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/bean/stateful/RemoteStatefulSBImpl.java +++ b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/bean/stateful/RemoteStatefulSBImpl.java @@ -1,6 +1,6 @@ /* * JBoss, Home of Professional Open Source. - * Copyright 2017, Red Hat Middleware LLC, and individual contributors + * Copyright 2017, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * @@ -20,11 +20,11 @@ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ -package org.jboss.as.test.clustering.twoclusters.bean.stateful; +package org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.stateful; import javax.ejb.Stateful; -import org.jboss.as.test.clustering.twoclusters.bean.common.CommonStatefulSBImpl; +import org.jboss.as.test.clustering.cluster.ejb.forwarding.bean.common.CommonStatefulSBImpl; /** * @author Radoslav Husar diff --git a/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/jboss-ejb-client.xml b/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/jboss-ejb-client.xml similarity index 100% rename from testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/twoclusters/jboss-ejb-client.xml rename to testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/forwarding/jboss-ejb-client.xml diff --git a/testsuite/integration/src/test/scripts/clustering-build.xml b/testsuite/integration/src/test/scripts/clustering-build.xml index 29c700974e85..c40001e80fbc 100644 --- a/testsuite/integration/src/test/scripts/clustering-build.xml +++ b/testsuite/integration/src/test/scripts/clustering-build.xml @@ -21,7 +21,6 @@ - @@ -189,52 +188,4 @@ - - - - - Building two cluster configs with clusters clusterA, clusterB - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/testsuite/integration/src/test/xslt/changeClusterName.xsl b/testsuite/integration/src/test/xslt/changeClusterName.xsl deleted file mode 100644 index 359aa330dc8c..000000000000 --- a/testsuite/integration/src/test/xslt/changeClusterName.xsl +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -