You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2022/03/21 20:48:53 UTC
[activemq-artemis] branch main updated: ARTEMIS-3716 move e2e tests to e2e-tests module
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new 968e488 ARTEMIS-3716 move e2e tests to e2e-tests module
new 978b7d2 This closes #3980
968e488 is described below
commit 968e4886c81324900418474f452c361fbc8c585d
Author: Tiago Bueno <49...@users.noreply.github.com>
AuthorDate: Mon Aug 2 15:22:46 2021 -0300
ARTEMIS-3716 move e2e tests to e2e-tests module
Move all tests which are related to end-to-end testing from smoke-tests
module to a new module named e2e-tests.
These e2e tests are those which are dependent of ContainerService
class. ContainerService class uses artemis inside a container by using
the testcontainers library and for that reason these tests are usually
a quite slow and tecnically they are not a smoke test.
The new e2e-tests module is part of tests module but it is not enabled
by default and to get executed it requires the e2e-tests profile
specification on maven command.
---
pom.xml | 1 +
tests/e2e-tests/pom.xml | 300 +++++++++++++++++++
.../src/main/resources/containerService/README | 0
.../src/main/resources/containerService/artemis | 0
.../resources/containerService/artemis.profile | 2 +-
.../main/resources/containerService/bootstrap.xml | 2 +-
.../brokerConnect/chainedMirror/serverA/broker.xml | 0
.../brokerConnect/chainedMirror/serverB/broker.xml | 0
.../chainedMirror/serverRoot/broker.xml | 0
.../resources/servers/brokerConnect/qdr/broker.xml | 0
.../servers/brokerConnect/qdr/qdrouterd.conf | 0
.../brokerConnect/replicaBackupServerA/broker.xml | 0
.../brokerConnect/replicaBackupServerB/broker.xml | 0
.../brokerConnect/replicaMainServerA/broker.xml | 0
.../brokerConnect/replicaMainServerB/broker.xml | 0
.../servers/brokerConnect/serverA/broker.xml | 0
.../brokerConnect/serverA}/logging.properties | 0
.../servers/brokerConnect/serverB/broker.xml | 0
.../brokerConnect}/serverB/logging.properties | 0
.../brokerConnect/splitMirror/serverA/broker.xml | 0
.../splitMirror/serverA/logging.properties | 0
.../brokerConnect/splitMirror/serverB/broker.xml | 0
.../splitMirror}/serverB/logging.properties | 0
.../splitMirror/serverRoot/broker.xml | 0
.../splitMirror/serverRoot}/logging.properties | 0
.../pluggablequorumvote/backup/broker.xml | 315 ++++++++++++++++++++
.../pluggablequorumvote/backup/management.xml | 52 ++++
.../pluggablequorumvote/primary/broker.xml | 313 ++++++++++++++++++++
.../pluggablequorumvote/primary/management.xml | 52 ++++
.../e2e}/brokerConnection/ChainedMirrorTest.java | 8 +-
.../DualMirrorFailoverWithContainerTest.java | 8 +-
.../DualMirrorWithContainerTest.java | 12 +-
.../brokerConnection/QpidDispatchPeerTest.java | 8 +-
.../e2e}/brokerConnection/SplitMirrorTest.java | 8 +-
.../e2e}/brokerConnection/ValidateContainer.java | 4 +-
.../tests/e2e}/common/ContainerService.java | 72 ++++-
.../artemis/tests/e2e/common/E2ETestBase.java | 49 +++
.../GCPauseSimulationTests.java | 328 +++++++++++++++++++++
.../PluggableQuorumVoteTestBase.java | 78 +++++
tests/pom.xml | 7 +
tests/smoke-tests/pom.xml | 167 +----------
41 files changed, 1587 insertions(+), 199 deletions(-)
diff --git a/pom.xml b/pom.xml
index 4ca5ea6..3fa36e5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -194,6 +194,7 @@
<skipPerformanceTests>true</skipPerformanceTests>
<skipRestTests>true</skipRestTests>
<skipActiveMQ5Tests>true</skipActiveMQ5Tests>
+ <skipE2ETests>true</skipE2ETests>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
diff --git a/tests/e2e-tests/pom.xml b/tests/e2e-tests/pom.xml
new file mode 100644
index 0000000..f40b27a
--- /dev/null
+++ b/tests/e2e-tests/pom.xml
@@ -0,0 +1,300 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.activemq.tests</groupId>
+ <artifactId>artemis-tests-pom</artifactId>
+ <version>2.21.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>e2e-tests</artifactId>
+ <packaging>jar</packaging>
+ <name>End-to-End Tests</name>
+
+ <properties>
+ <activemq.basedir>${project.basedir}/../../</activemq.basedir>
+ <e2ets-surefire-extra-args/>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.testcontainers</groupId>
+ <artifactId>testcontainers</artifactId>
+ <version>1.16.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>artemis-jms-client</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-jms-client</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>artemis-server</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ <type>test-jar</type>
+ </dependency>
+ <!-- this dependency is needed for JMX and maybe other tools from smoke-tests -->
+ <dependency>
+ <groupId>org.apache.activemq.tests</groupId>
+ <artifactId>smoke-tests</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ <type>test-jar</type>
+ </dependency>
+ <!-- this dependency is needed for CFUtil and other tools from integration-tests -->
+ <dependency>
+ <groupId>org.apache.activemq.tests</groupId>
+ <artifactId>integration-tests</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ <type>test-jar</type>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>artemis-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-pluggablequorumvote-primary</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <role>amq</role>
+ <user>artemis</user>
+ <password>artemis</password>
+ <allowAnonymous>false</allowAnonymous>
+ <noWeb>false</noWeb>
+ <instance>${basedir}/target/ha/replication/pluggablequorumvote/primary</instance>
+ <configuration>${basedir}/target/classes/servers/ha/replication/pluggablequorumvote/primary
+ </configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-pluggablequorumvote-backup</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <role>amq</role>
+ <user>artemis</user>
+ <password>artemis</password>
+ <allowAnonymous>false</allowAnonymous>
+ <noWeb>false</noWeb>
+ <instance>${basedir}/target/ha/replication/pluggablequorumvote/backup</instance>
+ <configuration>${basedir}/target/classes/servers/ha/replication/pluggablequorumvote/backup
+ </configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-bc-dual-root</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <instance>${basedir}/target/brokerConnect/splitMirror/serverRoot</instance>
+ <configuration>${basedir}/target/classes/servers/brokerConnect/splitMirror/serverRoot</configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-bc-dual-A</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <instance>${basedir}/target/brokerConnect/splitMirror/serverA</instance>
+ <configuration>${basedir}/target/classes/servers/brokerConnect/splitMirror/serverA</configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-bc-dual-B</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <instance>${basedir}/target/brokerConnect/splitMirror/serverB</instance>
+ <configuration>${basedir}/target/classes/servers/brokerConnect/splitMirror/serverB</configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-qdr</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <role>amq</role>
+ <user>artemis</user>
+ <password>artemis</password>
+ <allowAnonymous>false</allowAnonymous>
+ <noWeb>false</noWeb>
+ <instance>${basedir}/target/brokerConnect/qdr</instance>
+ <configuration>${basedir}/target/classes/servers/brokerConnect/qdr</configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-dualMirror-serverA</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <role>amq</role>
+ <user>artemis</user>
+ <password>artemis</password>
+ <allowAnonymous>false</allowAnonymous>
+ <noWeb>false</noWeb>
+ <instance>${basedir}/target/brokerConnect/serverA</instance>
+ <configuration>${basedir}/target/classes/servers/brokerConnect/serverA</configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-dualMirror-serverB</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <role>amq</role>
+ <user>artemis</user>
+ <password>artemis</password>
+ <allowAnonymous>false</allowAnonymous>
+ <noWeb>false</noWeb>
+ <instance>${basedir}/target/brokerConnect/serverB</instance>
+ <configuration>${basedir}/target/classes/servers/brokerConnect/serverB</configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-bc-replica-main-A</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <instance>${basedir}/target/brokerConnect/replicaMainServerA</instance>
+ <configuration>${basedir}/target/classes/servers/brokerConnect/replicaMainServerA</configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-bc-replica-backup-A</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <instance>${basedir}/target/brokerConnect/replicaBackupServerA</instance>
+ <configuration>${basedir}/target/classes/servers/brokerConnect/replicaBackupServerA</configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-bc-replica-main-B</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <instance>${basedir}/target/brokerConnect/replicaMainServerB</instance>
+ <configuration>${basedir}/target/classes/servers/brokerConnect/replicaMainServerB</configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-bc-replica-backup-B</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <instance>${basedir}/target/brokerConnect/replicaBackupServerB</instance>
+ <configuration>${basedir}/target/classes/servers/brokerConnect/replicaBackupServerB</configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-bc-chained-root</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <instance>${basedir}/target/brokerConnect/chainedMirror/serverRoot</instance>
+ <configuration>${basedir}/target/classes/servers/brokerConnect/chainedMirror/serverRoot</configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-bc-chained-A</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <instance>${basedir}/target/brokerConnect/chainedMirror/serverA</instance>
+ <configuration>${basedir}/target/classes/servers/brokerConnect/chainedMirror/serverA</configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-bc-chained-B</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <instance>${basedir}/target/brokerConnect/chainedMirror/serverB</instance>
+ <configuration>${basedir}/target/classes/servers/brokerConnect/chainedMirror/serverB</configuration>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>${skipE2ETests}</skipTests>
+ <argLine>${e2ets-surefire-extra-args} ${activemq-surefire-argline} -Dorg.apache.activemq.artemis.tests.e2e.common.ContainerService.service.userid="1000"</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
diff --git a/tests/smoke-tests/src/main/resources/containerService/README b/tests/e2e-tests/src/main/resources/containerService/README
similarity index 100%
rename from tests/smoke-tests/src/main/resources/containerService/README
rename to tests/e2e-tests/src/main/resources/containerService/README
diff --git a/tests/smoke-tests/src/main/resources/containerService/artemis b/tests/e2e-tests/src/main/resources/containerService/artemis
similarity index 100%
rename from tests/smoke-tests/src/main/resources/containerService/artemis
rename to tests/e2e-tests/src/main/resources/containerService/artemis
diff --git a/tests/smoke-tests/src/main/resources/containerService/artemis.profile b/tests/e2e-tests/src/main/resources/containerService/artemis.profile
similarity index 86%
rename from tests/smoke-tests/src/main/resources/containerService/artemis.profile
rename to tests/e2e-tests/src/main/resources/containerService/artemis.profile
index 93cffdc..6285e85 100644
--- a/tests/smoke-tests/src/main/resources/containerService/artemis.profile
+++ b/tests/e2e-tests/src/main/resources/containerService/artemis.profile
@@ -34,5 +34,5 @@ HAWTIO_ROLE='amq'
# Java Opts
if [ -z "$JAVA_ARGS" ]; then
- JAVA_ARGS="-XX:+PrintClassHistogram -XX:+UseG1GC -XX:+UseStringDeduplication -Xms128M -Xmx512M -Dhawtio.disableProxy=true -Dhawtio.realm=activemq -Dhawtio.offline=true -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Djolokia.policyLocation=${ARTEMIS_INSTANCE_ETC_URI}jolokia-access.xml "
+ JAVA_ARGS="-XX:+PrintClassHistogram -XX:+UseG1GC -XX:+UseStringDeduplication -Xms128M -Xmx512M -Dhawtio.disableProxy=true -Dhawtio.realm=activemq -Dhawtio.offline=true -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Djolokia.policyLocation=${ARTEMIS_INSTANCE_ETC_URI}jolokia-access.xml -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.rmi.port=1099 -Dcom.sun.management.jmxremote.local. [...]
fi
\ No newline at end of file
diff --git a/tests/smoke-tests/src/main/resources/containerService/bootstrap.xml b/tests/e2e-tests/src/main/resources/containerService/bootstrap.xml
similarity index 97%
rename from tests/smoke-tests/src/main/resources/containerService/bootstrap.xml
rename to tests/e2e-tests/src/main/resources/containerService/bootstrap.xml
index 55e64fc..30059db 100644
--- a/tests/smoke-tests/src/main/resources/containerService/bootstrap.xml
+++ b/tests/e2e-tests/src/main/resources/containerService/bootstrap.xml
@@ -27,7 +27,7 @@
<!-- The web server is only bound to localhost by default -->
<web path="web">
- <binding uri="http://localhost:8161">
+ <binding uri="http://0.0.0.0:8161">
<app url="activemq-branding" war="activemq-branding.war"/>
<app url="artemis-plugin" war="artemis-plugin.war"/>
<app url="console" war="console.war"/>
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/chainedMirror/serverA/broker.xml b/tests/e2e-tests/src/main/resources/servers/brokerConnect/chainedMirror/serverA/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/chainedMirror/serverA/broker.xml
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/chainedMirror/serverA/broker.xml
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/chainedMirror/serverB/broker.xml b/tests/e2e-tests/src/main/resources/servers/brokerConnect/chainedMirror/serverB/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/chainedMirror/serverB/broker.xml
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/chainedMirror/serverB/broker.xml
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/chainedMirror/serverRoot/broker.xml b/tests/e2e-tests/src/main/resources/servers/brokerConnect/chainedMirror/serverRoot/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/chainedMirror/serverRoot/broker.xml
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/chainedMirror/serverRoot/broker.xml
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/qdr/broker.xml b/tests/e2e-tests/src/main/resources/servers/brokerConnect/qdr/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/qdr/broker.xml
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/qdr/broker.xml
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/qdr/qdrouterd.conf b/tests/e2e-tests/src/main/resources/servers/brokerConnect/qdr/qdrouterd.conf
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/qdr/qdrouterd.conf
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/qdr/qdrouterd.conf
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/replicaBackupServerA/broker.xml b/tests/e2e-tests/src/main/resources/servers/brokerConnect/replicaBackupServerA/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/replicaBackupServerA/broker.xml
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/replicaBackupServerA/broker.xml
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/replicaBackupServerB/broker.xml b/tests/e2e-tests/src/main/resources/servers/brokerConnect/replicaBackupServerB/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/replicaBackupServerB/broker.xml
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/replicaBackupServerB/broker.xml
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/replicaMainServerA/broker.xml b/tests/e2e-tests/src/main/resources/servers/brokerConnect/replicaMainServerA/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/replicaMainServerA/broker.xml
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/replicaMainServerA/broker.xml
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/replicaMainServerB/broker.xml b/tests/e2e-tests/src/main/resources/servers/brokerConnect/replicaMainServerB/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/replicaMainServerB/broker.xml
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/replicaMainServerB/broker.xml
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/serverA/broker.xml b/tests/e2e-tests/src/main/resources/servers/brokerConnect/serverA/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/serverA/broker.xml
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/serverA/broker.xml
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/splitMirror/serverRoot/logging.properties b/tests/e2e-tests/src/main/resources/servers/brokerConnect/serverA/logging.properties
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/splitMirror/serverRoot/logging.properties
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/serverA/logging.properties
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/serverB/broker.xml b/tests/e2e-tests/src/main/resources/servers/brokerConnect/serverB/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/serverB/broker.xml
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/serverB/broker.xml
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/splitMirror/serverB/logging.properties b/tests/e2e-tests/src/main/resources/servers/brokerConnect/serverB/logging.properties
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/splitMirror/serverB/logging.properties
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/serverB/logging.properties
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/splitMirror/serverA/broker.xml b/tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverA/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/splitMirror/serverA/broker.xml
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverA/broker.xml
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/splitMirror/serverA/logging.properties b/tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverA/logging.properties
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/splitMirror/serverA/logging.properties
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverA/logging.properties
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/splitMirror/serverB/broker.xml b/tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverB/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/splitMirror/serverB/broker.xml
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverB/broker.xml
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/serverB/logging.properties b/tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverB/logging.properties
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/serverB/logging.properties
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverB/logging.properties
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/splitMirror/serverRoot/broker.xml b/tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverRoot/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/splitMirror/serverRoot/broker.xml
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverRoot/broker.xml
diff --git a/tests/smoke-tests/src/main/resources/servers/brokerConnect/serverA/logging.properties b/tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverRoot/logging.properties
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/brokerConnect/serverA/logging.properties
rename to tests/e2e-tests/src/main/resources/servers/brokerConnect/splitMirror/serverRoot/logging.properties
diff --git a/tests/e2e-tests/src/main/resources/servers/ha/replication/pluggablequorumvote/backup/broker.xml b/tests/e2e-tests/src/main/resources/servers/ha/replication/pluggablequorumvote/backup/broker.xml
new file mode 100644
index 0000000..e8ab5d7
--- /dev/null
+++ b/tests/e2e-tests/src/main/resources/servers/ha/replication/pluggablequorumvote/backup/broker.xml
@@ -0,0 +1,315 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<configuration xmlns="urn:activemq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
+
+ <core xmlns="urn:activemq:core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:activemq:core ">
+
+ <name>artemis-backup</name>
+
+
+ <persistence-enabled>true</persistence-enabled>
+
+ <!-- this could be ASYNCIO, MAPPED, NIO
+ ASYNCIO: Linux Libaio
+ MAPPED: mmap files
+ NIO: Plain Java Files
+ -->
+ <journal-type>ASYNCIO</journal-type>
+
+ <paging-directory>data/paging</paging-directory>
+
+ <bindings-directory>data/bindings</bindings-directory>
+
+ <journal-directory>data/journal</journal-directory>
+
+ <large-messages-directory>data/large-messages</large-messages-directory>
+
+ <journal-datasync>true</journal-datasync>
+
+ <journal-min-files>2</journal-min-files>
+
+ <journal-pool-files>10</journal-pool-files>
+
+ <journal-device-block-size>4096</journal-device-block-size>
+
+ <journal-file-size>10M</journal-file-size>
+
+ <!--
+ This value was determined through a calculation.
+ Your system could perform 83.33 writes per millisecond
+ on the current journal configuration.
+ That translates as a sync write every 12000 nanoseconds.
+
+ Note: If you specify 0 the system will perform writes directly to the disk.
+ We recommend this to be 0 if you are using journalType=MAPPED and journal-datasync=false.
+ -->
+ <journal-buffer-timeout>12000</journal-buffer-timeout>
+
+
+ <!--
+ When using ASYNCIO, this will determine the writing queue depth for libaio.
+ -->
+ <journal-max-io>4096</journal-max-io>
+ <!--
+ You can verify the network health of a particular NIC by specifying the <network-check-NIC> element.
+ <network-check-NIC>theNicName</network-check-NIC>
+ -->
+
+ <!--
+ Use this to use an HTTP server to validate the network
+ <network-check-URL-list>http://www.apache.org</network-check-URL-list> -->
+
+ <!-- <network-check-period>10000</network-check-period> -->
+ <!-- <network-check-timeout>1000</network-check-timeout> -->
+
+ <!-- this is a comma separated list, no spaces, just DNS or IPs
+ it should accept IPV6
+
+ Warning: Make sure you understand your network topology as this is meant to validate if your network is valid.
+ Using IPs that could eventually disappear or be partially visible may defeat the purpose.
+ You can use a list of multiple IPs, and if any successful ping will make the server OK to continue running -->
+ <!-- <network-check-list>10.0.0.1</network-check-list> -->
+
+ <!-- use this to customize the ping used for ipv4 addresses -->
+ <!-- <network-check-ping-command>ping -c 1 -t %d %s</network-check-ping-command> -->
+
+ <!-- use this to customize the ping used for ipv6 addresses -->
+ <!-- <network-check-ping6-command>ping6 -c 1 %2$s</network-check-ping6-command> -->
+
+
+ <!-- how often we are looking for how many bytes are being used on the disk in ms -->
+ <disk-scan-period>5000</disk-scan-period>
+
+ <!-- once the disk hits this limit the system will block, or close the connection in certain protocols
+ that won't support flow control. -->
+ <max-disk-usage>90</max-disk-usage>
+
+ <!-- should the broker detect dead locks and other issues -->
+ <critical-analyzer>true</critical-analyzer>
+
+ <critical-analyzer-timeout>120000</critical-analyzer-timeout>
+
+ <critical-analyzer-check-period>60000</critical-analyzer-check-period>
+
+ <critical-analyzer-policy>HALT</critical-analyzer-policy>
+
+
+ <page-sync-timeout>1032000</page-sync-timeout>
+
+
+ <!-- the system will enter into page mode once you hit this limit.
+ This is an estimate in bytes of how much the messages are using in memory
+
+ The system will use half of the available memory (-Xmx) by default for the global-max-size.
+ You may specify a different value here if you need to customize it to your needs.
+
+ <global-max-size>100Mb</global-max-size>
+
+ -->
+
+ <acceptors>
+
+ <!-- useEpoll means: it will use Netty epoll if you are on a system (Linux) that supports it -->
+ <!-- amqpCredits: The number of credits sent to AMQP producers -->
+ <!-- amqpLowCredits: The server will send the # credits specified at amqpCredits at this low mark -->
+ <!-- amqpDuplicateDetection: If you are not using duplicate detection, set this to false
+ as duplicate detection requires applicationProperties to be parsed on the server. -->
+ <!-- amqpMinLargeMessageSize: Determines how many bytes are considered large, so we start using files to hold their data.
+ default: 102400, -1 would mean to disable large mesasge control -->
+
+ <!-- Note: If an acceptor needs to be compatible with HornetQ and/or Artemis 1.x clients add
+ "anycastPrefix=jms.queue.;multicastPrefix=jms.topic." to the acceptor url.
+ See https://issues.apache.org/jira/browse/ARTEMIS-1644 for more information. -->
+
+
+ <!-- Acceptor for every supported protocol -->
+ <acceptor name="artemis">
+ tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;amqpMinLargeMessageSize=102400;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpDuplicateDetection=true
+ </acceptor>
+
+ <!-- AMQP Acceptor. Listens on default AMQP port for AMQP traffic.-->
+ <acceptor name="amqp">
+ tcp://0.0.0.0:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpMinLargeMessageSize=102400;amqpDuplicateDetection=true
+ </acceptor>
+
+ <!-- STOMP Acceptor. -->
+ <acceptor name="stomp">
+ tcp://0.0.0.0:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true
+ </acceptor>
+
+ <!-- HornetQ Compatibility Acceptor. Enables HornetQ Core and STOMP for legacy HornetQ clients. -->
+ <acceptor name="hornetq">
+ tcp://0.0.0.0:5445?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;protocols=HORNETQ,STOMP;useEpoll=true
+ </acceptor>
+
+ <!-- MQTT Acceptor -->
+ <acceptor name="mqtt">
+ tcp://0.0.0.0:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true
+ </acceptor>
+
+ </acceptors>
+
+ <!-- Cluster connector -->
+ <connectors>
+ <connector name="cluster-connector">tcp://artemis-backup:61616</connector>
+ </connectors>
+
+ <broadcast-groups>
+ <broadcast-group name="my-broadcast-group">
+ <local-bind-address>0.0.0.0</local-bind-address>
+ <local-bind-port>-1</local-bind-port>
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <broadcast-period>2000</broadcast-period>
+ <connector-ref>cluster-connector</connector-ref>
+ </broadcast-group>
+ </broadcast-groups>
+
+ <discovery-groups>
+ <discovery-group name="my-discovery-group">
+ <local-bind-address>0.0.0.0</local-bind-address>
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <refresh-timeout>10000</refresh-timeout>
+ </discovery-group>
+ </discovery-groups>
+
+ <cluster-connections>
+ <cluster-connection name="my-cluster">
+ <connector-ref>cluster-connector</connector-ref>
+ <check-period>1000</check-period>
+ <connection-ttl>5000</connection-ttl>
+ <discovery-group-ref discovery-group-name="my-discovery-group"/>
+ </cluster-connection>
+ </cluster-connections>
+
+ <ha-policy>
+ <replication>
+ <backup>
+ <cluster-name>my-cluster</cluster-name>
+ <group-name>group1</group-name>
+ <max-saved-replicated-journals-size>22</max-saved-replicated-journals-size>
+ <allow-failback>true</allow-failback>
+ <initial-replication-sync-timeout>9876</initial-replication-sync-timeout>
+ <retry-replication-wait>12345</retry-replication-wait>
+ <manager>
+ <!--
+ class-name defaults to:
+ <class-name>
+ org.apache.activemq.artemis.core.config.impl.HAPolicyConfigurationTest$FakeDistributedPrimitiveManager
+ </class-name>
+ -->
+ <properties>
+ <property key="connect-string" value="zk1:2181,zk2:2181,zk3:2181"/> <!-- no default -->
+ <property key="session-ms" value="18000"/> <!-- default 18000 ms -->
+ <property key="connection-ms" value="2000"/> <!-- default 8000 ms -->
+ <property key="retries" value="1"/> <!-- defaul 1 -->
+ <property key="retries-ms" value="2000"/> <!-- default 1000 ms -->
+ <property key="namespace" value="test"/> <!-- no default -->
+ <property key="session-percent" value="10"/> <!-- default 33; should be <= default, see https://cwiki.apache.org/confluence/display/CURATOR/TN14 for more info -->
+ </properties>
+ </manager>
+ </backup>
+ </replication>
+ </ha-policy>
+
+ <security-settings>
+ <security-setting match="#">
+ <permission type="createNonDurableQueue" roles="amq"/>
+ <permission type="deleteNonDurableQueue" roles="amq"/>
+ <permission type="createDurableQueue" roles="amq"/>
+ <permission type="deleteDurableQueue" roles="amq"/>
+ <permission type="createAddress" roles="amq"/>
+ <permission type="deleteAddress" roles="amq"/>
+ <permission type="consume" roles="amq"/>
+ <permission type="browse" roles="amq"/>
+ <permission type="send" roles="amq"/>
+ <!-- we need this otherwise ./artemis data imp wouldn't work -->
+ <permission type="manage" roles="amq"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!-- if you define auto-create on certain queues, management has to be auto-create -->
+ <address-setting match="activemq.management#">
+ <dead-letter-address>DLQ</dead-letter-address>
+ <expiry-address>ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <!-- with -1 only the global-max-size is in use for limiting -->
+ <max-size-bytes>-1</max-size-bytes>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <address-full-policy>PAGE</address-full-policy>
+ <auto-create-queues>true</auto-create-queues>
+ <auto-create-addresses>true</auto-create-addresses>
+ <auto-create-jms-queues>true</auto-create-jms-queues>
+ <auto-create-jms-topics>true</auto-create-jms-topics>
+ </address-setting>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <dead-letter-address>DLQ</dead-letter-address>
+ <expiry-address>ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <!-- with -1 only the global-max-size is in use for limiting -->
+ <max-size-bytes>-1</max-size-bytes>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <address-full-policy>PAGE</address-full-policy>
+ <auto-create-queues>true</auto-create-queues>
+ <auto-create-addresses>true</auto-create-addresses>
+ <auto-create-jms-queues>true</auto-create-jms-queues>
+ <auto-create-jms-topics>true</auto-create-jms-topics>
+ </address-setting>
+ </address-settings>
+
+ <addresses>
+ <address name="DLQ">
+ <anycast>
+ <queue name="DLQ"/>
+ </anycast>
+ </address>
+ <address name="ExpiryQueue">
+ <anycast>
+ <queue name="ExpiryQueue"/>
+ </anycast>
+ </address>
+
+ </addresses>
+
+
+ <!-- Uncomment the following if you want to use the Standard LoggingActiveMQServerPlugin pluging to log in events
+ <broker-plugins>
+ <broker-plugin class-name="org.apache.activemq.artemis.core.server.plugin.impl.LoggingActiveMQServerPlugin">
+ <property key="LOG_ALL_EVENTS" value="true"/>
+ <property key="LOG_CONNECTION_EVENTS" value="true"/>
+ <property key="LOG_SESSION_EVENTS" value="true"/>
+ <property key="LOG_CONSUMER_EVENTS" value="true"/>
+ <property key="LOG_DELIVERING_EVENTS" value="true"/>
+ <property key="LOG_SENDING_EVENTS" value="true"/>
+ <property key="LOG_INTERNAL_EVENTS" value="true"/>
+ </broker-plugin>
+ </broker-plugins>
+ -->
+
+ </core>
+</configuration>
diff --git a/tests/e2e-tests/src/main/resources/servers/ha/replication/pluggablequorumvote/backup/management.xml b/tests/e2e-tests/src/main/resources/servers/ha/replication/pluggablequorumvote/backup/management.xml
new file mode 100644
index 0000000..8a04084
--- /dev/null
+++ b/tests/e2e-tests/src/main/resources/servers/ha/replication/pluggablequorumvote/backup/management.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<management-context xmlns="http://activemq.apache.org/schema">
+ <!--<connector connector-port="1099"/>-->
+ <authorisation>
+ <allowlist>
+ <entry domain="hawtio"/>
+ </allowlist>
+ <default-access>
+ <access method="list*" roles="amq"/>
+ <access method="get*" roles="amq"/>
+ <access method="is*" roles="amq"/>
+ <access method="set*" roles="amq"/>
+ <access method="*" roles="amq"/>
+ </default-access>
+ <role-access>
+ <match domain="org.apache.activemq.artemis">
+ <access method="list*" roles="amq"/>
+ <access method="get*" roles="amq"/>
+ <access method="is*" roles="amq"/>
+ <access method="set*" roles="amq"/>
+ <!-- Note count and browse are need to access the browse tab in the console-->
+ <access method="browse*" roles="amq"/>
+ <access method="count*" roles="amq"/>
+ <access method="*" roles="amq"/>
+ </match>
+ <!--example of how to configure a specific object-->
+ <!--<match domain="org.apache.activemq.artemis" key="subcomponent=queues">
+ <access method="list*" roles="view,update,amq"/>
+ <access method="get*" roles="view,update,amq"/>
+ <access method="is*" roles="view,update,amq"/>
+ <access method="set*" roles="update,amq"/>
+ <access method="*" roles="amq"/>
+ </match>-->
+ </role-access>
+ </authorisation>
+</management-context>
diff --git a/tests/e2e-tests/src/main/resources/servers/ha/replication/pluggablequorumvote/primary/broker.xml b/tests/e2e-tests/src/main/resources/servers/ha/replication/pluggablequorumvote/primary/broker.xml
new file mode 100644
index 0000000..70d5f11
--- /dev/null
+++ b/tests/e2e-tests/src/main/resources/servers/ha/replication/pluggablequorumvote/primary/broker.xml
@@ -0,0 +1,313 @@
+<?xml version='1.0'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<configuration xmlns="urn:activemq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
+
+ <core xmlns="urn:activemq:core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:activemq:core ">
+
+ <name>artemis-primary</name>
+
+
+ <persistence-enabled>true</persistence-enabled>
+
+ <!-- this could be ASYNCIO, MAPPED, NIO
+ ASYNCIO: Linux Libaio
+ MAPPED: mmap files
+ NIO: Plain Java Files
+ -->
+ <journal-type>ASYNCIO</journal-type>
+
+ <paging-directory>data/paging</paging-directory>
+
+ <bindings-directory>data/bindings</bindings-directory>
+
+ <journal-directory>data/journal</journal-directory>
+
+ <large-messages-directory>data/large-messages</large-messages-directory>
+
+ <journal-datasync>true</journal-datasync>
+
+ <journal-min-files>2</journal-min-files>
+
+ <journal-pool-files>10</journal-pool-files>
+
+ <journal-device-block-size>4096</journal-device-block-size>
+
+ <journal-file-size>10M</journal-file-size>
+
+ <!--
+ This value was determined through a calculation.
+ Your system could perform 83.33 writes per millisecond
+ on the current journal configuration.
+ That translates as a sync write every 12000 nanoseconds.
+
+ Note: If you specify 0 the system will perform writes directly to the disk.
+ We recommend this to be 0 if you are using journalType=MAPPED and journal-datasync=false.
+ -->
+ <journal-buffer-timeout>12000</journal-buffer-timeout>
+
+
+ <!--
+ When using ASYNCIO, this will determine the writing queue depth for libaio.
+ -->
+ <journal-max-io>4096</journal-max-io>
+ <!--
+ You can verify the network health of a particular NIC by specifying the <network-check-NIC> element.
+ <network-check-NIC>theNicName</network-check-NIC>
+ -->
+
+ <!--
+ Use this to use an HTTP server to validate the network
+ <network-check-URL-list>http://www.apache.org</network-check-URL-list> -->
+
+ <!-- <network-check-period>10000</network-check-period> -->
+ <!-- <network-check-timeout>1000</network-check-timeout> -->
+
+ <!-- this is a comma separated list, no spaces, just DNS or IPs
+ it should accept IPV6
+
+ Warning: Make sure you understand your network topology as this is meant to validate if your network is valid.
+ Using IPs that could eventually disappear or be partially visible may defeat the purpose.
+ You can use a list of multiple IPs, and if any successful ping will make the server OK to continue running -->
+ <!-- <network-check-list>10.0.0.1</network-check-list> -->
+
+ <!-- use this to customize the ping used for ipv4 addresses -->
+ <!-- <network-check-ping-command>ping -c 1 -t %d %s</network-check-ping-command> -->
+
+ <!-- use this to customize the ping used for ipv6 addresses -->
+ <!-- <network-check-ping6-command>ping6 -c 1 %2$s</network-check-ping6-command> -->
+
+
+ <!-- how often we are looking for how many bytes are being used on the disk in ms -->
+ <disk-scan-period>5000</disk-scan-period>
+
+ <!-- once the disk hits this limit the system will block, or close the connection in certain protocols
+ that won't support flow control. -->
+ <max-disk-usage>90</max-disk-usage>
+
+ <!-- should the broker detect dead locks and other issues -->
+ <critical-analyzer>true</critical-analyzer>
+
+ <critical-analyzer-timeout>120000</critical-analyzer-timeout>
+
+ <critical-analyzer-check-period>60000</critical-analyzer-check-period>
+
+ <critical-analyzer-policy>HALT</critical-analyzer-policy>
+
+
+ <page-sync-timeout>1032000</page-sync-timeout>
+
+
+ <!-- the system will enter into page mode once you hit this limit.
+ This is an estimate in bytes of how much the messages are using in memory
+
+ The system will use half of the available memory (-Xmx) by default for the global-max-size.
+ You may specify a different value here if you need to customize it to your needs.
+
+ <global-max-size>100Mb</global-max-size>
+
+ -->
+
+ <acceptors>
+
+ <!-- useEpoll means: it will use Netty epoll if you are on a system (Linux) that supports it -->
+ <!-- amqpCredits: The number of credits sent to AMQP producers -->
+ <!-- amqpLowCredits: The server will send the # credits specified at amqpCredits at this low mark -->
+ <!-- amqpDuplicateDetection: If you are not using duplicate detection, set this to false
+ as duplicate detection requires applicationProperties to be parsed on the server. -->
+ <!-- amqpMinLargeMessageSize: Determines how many bytes are considered large, so we start using files to hold their data.
+ default: 102400, -1 would mean to disable large mesasge control -->
+
+ <!-- Note: If an acceptor needs to be compatible with HornetQ and/or Artemis 1.x clients add
+ "anycastPrefix=jms.queue.;multicastPrefix=jms.topic." to the acceptor url.
+ See https://issues.apache.org/jira/browse/ARTEMIS-1644 for more information. -->
+
+
+ <!-- Acceptor for every supported protocol -->
+ <acceptor name="artemis">
+ tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;amqpMinLargeMessageSize=102400;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpDuplicateDetection=true
+ </acceptor>
+
+ <!-- AMQP Acceptor. Listens on default AMQP port for AMQP traffic.-->
+ <acceptor name="amqp">
+ tcp://0.0.0.0:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpLowCredits=300;amqpMinLargeMessageSize=102400;amqpDuplicateDetection=true
+ </acceptor>
+
+ <!-- STOMP Acceptor. -->
+ <acceptor name="stomp">
+ tcp://0.0.0.0:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true
+ </acceptor>
+
+ <!-- HornetQ Compatibility Acceptor. Enables HornetQ Core and STOMP for legacy HornetQ clients. -->
+ <acceptor name="hornetq">
+ tcp://0.0.0.0:5445?anycastPrefix=jms.queue.;multicastPrefix=jms.topic.;protocols=HORNETQ,STOMP;useEpoll=true
+ </acceptor>
+
+ <!-- MQTT Acceptor -->
+ <acceptor name="mqtt">
+ tcp://0.0.0.0:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true
+ </acceptor>
+
+ </acceptors>
+
+ <!-- Cluster connector -->
+ <connectors>
+ <connector name="cluster-connector">tcp://artemis-primary:61616</connector>
+ </connectors>
+
+ <broadcast-groups>
+ <broadcast-group name="my-broadcast-group">
+ <local-bind-address>0.0.0.0</local-bind-address>
+ <local-bind-port>-1</local-bind-port>
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <broadcast-period>2000</broadcast-period>
+ <connector-ref>cluster-connector</connector-ref>
+ </broadcast-group>
+ </broadcast-groups>
+
+ <discovery-groups>
+ <discovery-group name="my-discovery-group">
+ <local-bind-address>0.0.0.0</local-bind-address>
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <refresh-timeout>10000</refresh-timeout>
+ </discovery-group>
+ </discovery-groups>
+
+ <cluster-connections>
+ <cluster-connection name="my-cluster">
+ <connector-ref>cluster-connector</connector-ref>
+ <check-period>1000</check-period>
+ <connection-ttl>5000</connection-ttl>
+ <discovery-group-ref discovery-group-name="my-discovery-group"/>
+ </cluster-connection>
+ </cluster-connections>
+
+ <ha-policy>
+ <replication>
+ <primary>
+ <cluster-name>my-cluster</cluster-name>
+ <group-name>group1</group-name>
+ <initial-replication-sync-timeout>9876</initial-replication-sync-timeout>
+ <retry-replication-wait>12345</retry-replication-wait>
+ <manager>
+ <!--
+ class-name defaults to:
+ <class-name>
+ org.apache.activemq.artemis.core.config.impl.HAPolicyConfigurationTest$FakeDistributedPrimitiveManager
+ </class-name>
+ -->
+ <properties>
+ <property key="connect-string" value="zk1:2181,zk2:2181,zk3:2181"/> <!-- no default -->
+ <property key="session-ms" value="18000"/> <!-- default 18000 ms -->
+ <property key="connection-ms" value="2000"/> <!-- default 8000 ms -->
+ <property key="retries" value="1"/> <!-- defaul 1 -->
+ <property key="retries-ms" value="2000"/> <!-- default 1000 ms -->
+ <property key="namespace" value="test"/> <!-- no default -->
+ <property key="session-percent" value="10"/> <!-- default 33; should be <= default, see https://cwiki.apache.org/confluence/display/CURATOR/TN14 for more info -->
+ </properties>
+ </manager>
+ </primary>
+ </replication>
+ </ha-policy>
+
+ <security-settings>
+ <security-setting match="#">
+ <permission type="createNonDurableQueue" roles="amq"/>
+ <permission type="deleteNonDurableQueue" roles="amq"/>
+ <permission type="createDurableQueue" roles="amq"/>
+ <permission type="deleteDurableQueue" roles="amq"/>
+ <permission type="createAddress" roles="amq"/>
+ <permission type="deleteAddress" roles="amq"/>
+ <permission type="consume" roles="amq"/>
+ <permission type="browse" roles="amq"/>
+ <permission type="send" roles="amq"/>
+ <!-- we need this otherwise ./artemis data imp wouldn't work -->
+ <permission type="manage" roles="amq"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!-- if you define auto-create on certain queues, management has to be auto-create -->
+ <address-setting match="activemq.management#">
+ <dead-letter-address>DLQ</dead-letter-address>
+ <expiry-address>ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <!-- with -1 only the global-max-size is in use for limiting -->
+ <max-size-bytes>-1</max-size-bytes>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <address-full-policy>PAGE</address-full-policy>
+ <auto-create-queues>true</auto-create-queues>
+ <auto-create-addresses>true</auto-create-addresses>
+ <auto-create-jms-queues>true</auto-create-jms-queues>
+ <auto-create-jms-topics>true</auto-create-jms-topics>
+ </address-setting>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <dead-letter-address>DLQ</dead-letter-address>
+ <expiry-address>ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <!-- with -1 only the global-max-size is in use for limiting -->
+ <max-size-bytes>-1</max-size-bytes>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <address-full-policy>PAGE</address-full-policy>
+ <auto-create-queues>true</auto-create-queues>
+ <auto-create-addresses>true</auto-create-addresses>
+ <auto-create-jms-queues>true</auto-create-jms-queues>
+ <auto-create-jms-topics>true</auto-create-jms-topics>
+ </address-setting>
+ </address-settings>
+
+ <addresses>
+ <address name="DLQ">
+ <anycast>
+ <queue name="DLQ"/>
+ </anycast>
+ </address>
+ <address name="ExpiryQueue">
+ <anycast>
+ <queue name="ExpiryQueue"/>
+ </anycast>
+ </address>
+
+ </addresses>
+
+
+ <!-- Uncomment the following if you want to use the Standard LoggingActiveMQServerPlugin pluging to log in events
+ <broker-plugins>
+ <broker-plugin class-name="org.apache.activemq.artemis.core.server.plugin.impl.LoggingActiveMQServerPlugin">
+ <property key="LOG_ALL_EVENTS" value="true"/>
+ <property key="LOG_CONNECTION_EVENTS" value="true"/>
+ <property key="LOG_SESSION_EVENTS" value="true"/>
+ <property key="LOG_CONSUMER_EVENTS" value="true"/>
+ <property key="LOG_DELIVERING_EVENTS" value="true"/>
+ <property key="LOG_SENDING_EVENTS" value="true"/>
+ <property key="LOG_INTERNAL_EVENTS" value="true"/>
+ </broker-plugin>
+ </broker-plugins>
+ -->
+
+ </core>
+</configuration>
diff --git a/tests/e2e-tests/src/main/resources/servers/ha/replication/pluggablequorumvote/primary/management.xml b/tests/e2e-tests/src/main/resources/servers/ha/replication/pluggablequorumvote/primary/management.xml
new file mode 100644
index 0000000..df4db2c
--- /dev/null
+++ b/tests/e2e-tests/src/main/resources/servers/ha/replication/pluggablequorumvote/primary/management.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<management-context xmlns="http://activemq.apache.org/schema">
+ <connector connector-port="1099"/>
+ <authorisation>
+ <allowlist>
+ <entry domain="hawtio"/>
+ </allowlist>
+ <default-access>
+ <access method="list*" roles="amq"/>
+ <access method="get*" roles="amq"/>
+ <access method="is*" roles="amq"/>
+ <access method="set*" roles="amq"/>
+ <access method="*" roles="amq"/>
+ </default-access>
+ <role-access>
+ <match domain="org.apache.activemq.artemis">
+ <access method="list*" roles="amq"/>
+ <access method="get*" roles="amq"/>
+ <access method="is*" roles="amq"/>
+ <access method="set*" roles="amq"/>
+ <!-- Note count and browse are need to access the browse tab in the console-->
+ <access method="browse*" roles="amq"/>
+ <access method="count*" roles="amq"/>
+ <access method="*" roles="amq"/>
+ </match>
+ <!--example of how to configure a specific object-->
+ <!--<match domain="org.apache.activemq.artemis" key="subcomponent=queues">
+ <access method="list*" roles="view,update,amq"/>
+ <access method="get*" roles="view,update,amq"/>
+ <access method="is*" roles="view,update,amq"/>
+ <access method="set*" roles="update,amq"/>
+ <access method="*" roles="amq"/>
+ </match>-->
+ </role-access>
+ </authorisation>
+</management-context>
diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/ChainedMirrorTest.java b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/ChainedMirrorTest.java
similarity index 96%
rename from tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/ChainedMirrorTest.java
rename to tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/ChainedMirrorTest.java
index 6799639..db00673 100644
--- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/ChainedMirrorTest.java
+++ b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/ChainedMirrorTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.activemq.artemis.tests.smoke.brokerConnection;
+package org.apache.activemq.artemis.tests.e2e.brokerConnection;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
@@ -24,15 +24,15 @@ import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;
-import org.apache.activemq.artemis.tests.smoke.common.ContainerService;
-import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
+import org.apache.activemq.artemis.tests.e2e.common.ContainerService;
+import org.apache.activemq.artemis.tests.e2e.common.E2ETestBase;
import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-public class ChainedMirrorTest extends SmokeTestBase {
+public class ChainedMirrorTest extends E2ETestBase {
private static final Logger logger = Logger.getLogger(ChainedMirrorTest.class);
diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/DualMirrorFailoverWithContainerTest.java b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/DualMirrorFailoverWithContainerTest.java
similarity index 96%
rename from tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/DualMirrorFailoverWithContainerTest.java
rename to tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/DualMirrorFailoverWithContainerTest.java
index 22db7e1..debb60a 100644
--- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/DualMirrorFailoverWithContainerTest.java
+++ b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/DualMirrorFailoverWithContainerTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.activemq.artemis.tests.smoke.brokerConnection;
+package org.apache.activemq.artemis.tests.e2e.brokerConnection;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
@@ -25,15 +25,15 @@ import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
-import org.apache.activemq.artemis.tests.smoke.common.ContainerService;
-import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
+import org.apache.activemq.artemis.tests.e2e.common.ContainerService;
+import org.apache.activemq.artemis.tests.e2e.common.E2ETestBase;
import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-public class DualMirrorFailoverWithContainerTest extends SmokeTestBase {
+public class DualMirrorFailoverWithContainerTest extends E2ETestBase {
private static final Logger logger = Logger.getLogger(DualMirrorFailoverWithContainerTest.class);
diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/DualMirrorWithContainerTest.java b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/DualMirrorWithContainerTest.java
similarity index 95%
rename from tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/DualMirrorWithContainerTest.java
rename to tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/DualMirrorWithContainerTest.java
index 2fe17f6..de9f0c7 100644
--- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/DualMirrorWithContainerTest.java
+++ b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/DualMirrorWithContainerTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.activemq.artemis.tests.smoke.brokerConnection;
+package org.apache.activemq.artemis.tests.e2e.brokerConnection;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
@@ -26,14 +26,14 @@ import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
-import org.apache.activemq.artemis.tests.smoke.common.ContainerService;
-import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
+import org.apache.activemq.artemis.tests.e2e.common.ContainerService;
+import org.apache.activemq.artemis.tests.e2e.common.E2ETestBase;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-public class DualMirrorWithContainerTest extends SmokeTestBase {
+public class DualMirrorWithContainerTest extends E2ETestBase {
Object network;
@@ -236,12 +236,12 @@ public class DualMirrorWithContainerTest extends SmokeTestBase {
}
private void restartB() throws Exception {
- ContainerService.getService().restart(serverB);
+ ContainerService.getService().restartWithKill(serverB);
cfB = ContainerService.getService().createCF(serverB, "amqp");
}
private void restartA(int restartNumber) throws Exception {
- ContainerService.getService().restart(serverA);
+ ContainerService.getService().restartWithKill(serverA);
cfA = ContainerService.getService().createCF(serverB, "amqp");
}
diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/QpidDispatchPeerTest.java b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/QpidDispatchPeerTest.java
similarity index 96%
rename from tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/QpidDispatchPeerTest.java
rename to tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/QpidDispatchPeerTest.java
index c5c8464..0598e55 100644
--- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/QpidDispatchPeerTest.java
+++ b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/QpidDispatchPeerTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.activemq.artemis.tests.smoke.brokerConnection;
+package org.apache.activemq.artemis.tests.e2e.brokerConnection;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
@@ -25,8 +25,8 @@ import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
-import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
-import org.apache.activemq.artemis.tests.smoke.common.ContainerService;
+import org.apache.activemq.artemis.tests.e2e.common.E2ETestBase;
+import org.apache.activemq.artemis.tests.e2e.common.ContainerService;
import org.jboss.logging.Logger;
import org.junit.AfterClass;
import org.junit.Assert;
@@ -38,7 +38,7 @@ import org.junit.Test;
* You need to build the Artemis Centos image before this test is executed.
* Follow the instructions under artemis-docker and build the Docker-centos image.
*/
-public class QpidDispatchPeerTest extends SmokeTestBase {
+public class QpidDispatchPeerTest extends E2ETestBase {
private static final Logger logger = Logger.getLogger(QpidDispatchPeerTest.class);
diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/SplitMirrorTest.java b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/SplitMirrorTest.java
similarity index 96%
rename from tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/SplitMirrorTest.java
rename to tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/SplitMirrorTest.java
index e4ccb80..9cea6d2 100644
--- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/SplitMirrorTest.java
+++ b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/SplitMirrorTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.activemq.artemis.tests.smoke.brokerConnection;
+package org.apache.activemq.artemis.tests.e2e.brokerConnection;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
@@ -25,15 +25,15 @@ import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
-import org.apache.activemq.artemis.tests.smoke.common.ContainerService;
-import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
+import org.apache.activemq.artemis.tests.e2e.common.ContainerService;
+import org.apache.activemq.artemis.tests.e2e.common.E2ETestBase;
import org.jboss.logging.Logger;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-public class SplitMirrorTest extends SmokeTestBase {
+public class SplitMirrorTest extends E2ETestBase {
private static final Logger logger = Logger.getLogger(SplitMirrorTest.class);
diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/ValidateContainer.java b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/ValidateContainer.java
similarity index 94%
rename from tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/ValidateContainer.java
rename to tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/ValidateContainer.java
index a5c638a..a3bf65f 100644
--- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/brokerConnection/ValidateContainer.java
+++ b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/brokerConnection/ValidateContainer.java
@@ -15,11 +15,11 @@
* limitations under the License.
*/
-package org.apache.activemq.artemis.tests.smoke.brokerConnection;
+package org.apache.activemq.artemis.tests.e2e.brokerConnection;
import java.io.File;
-import org.apache.activemq.artemis.tests.smoke.common.ContainerService;
+import org.apache.activemq.artemis.tests.e2e.common.ContainerService;
import org.junit.Assume;
/** The purpose of this class is to validate if "artemis-centos" and docker (or an equivalent) is available on the environment.
diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/common/ContainerService.java b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/common/ContainerService.java
similarity index 80%
rename from tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/common/ContainerService.java
rename to tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/common/ContainerService.java
index 3f75e6f..81918d8 100644
--- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/common/ContainerService.java
+++ b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/common/ContainerService.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.activemq.artemis.tests.smoke.common;
+package org.apache.activemq.artemis.tests.e2e.common;
import javax.jms.ConnectionFactory;
@@ -90,7 +90,9 @@ public abstract class ContainerService {
public abstract void stop(Object container);
- public abstract void restart(Object container);
+ public abstract void restartWithStop(Object container);
+
+ public abstract void restartWithKill(Object container);
public abstract int getPort(Object container, int mappedPort);
@@ -99,9 +101,7 @@ public abstract class ContainerService {
/** prepare the instance folder to run inside the docker image */
public abstract void prepareInstance(String home) throws Exception;
- public String getHost(Object container) {
- return "localhost";
- }
+ public abstract String getHost(Object container);
public abstract ConnectionFactory createCF(Object container, String protocol);
@@ -133,6 +133,16 @@ public abstract class ContainerService {
public abstract void logWait(Object container, String log);
+ public abstract Object newZookeeperImage();
+
+ public abstract void withEnvVar(Object container, String varName, String varValue);
+
+ public abstract void pause(Object container);
+
+ public abstract void unpause(Object container);
+
+ public abstract String getStatus(Object container);
+
private static class TestContainerImpl extends ContainerService {
@Override
@@ -152,7 +162,7 @@ public abstract class ContainerService {
}
private void copyFile(String from, String to) throws IOException {
- File file = new File(SmokeTestBase.basedir + "/src/main/resources/containerService/" + from);
+ File file = new File(E2ETestBase.basedir + "/src/main/resources/containerService/" + from);
Files.copy(file.toPath(), new File(to).toPath(), StandardCopyOption.REPLACE_EXISTING);
}
@@ -221,13 +231,25 @@ public abstract class ContainerService {
}
@Override
- public void start(Object container) {
+ public void start(Object containerObj) {
+ GenericContainer<?> container = (GenericContainer) containerObj;
+ String userId = System.getProperty(ContainerService.class.getName() + ".service.userid", "");
+ if (!userId.isEmpty()) {
+ container.withCreateContainerCmdModifier(cmd -> cmd.withUser(userId));
+ }
+
((GenericContainer)container).setStartupCheckStrategy(new IsRunningStartupCheckStrategy());
((GenericContainer)container).start();
}
@Override
- public void restart(Object containerObj) {
+ public void restartWithStop(Object containerObj) {
+ stop(containerObj);
+ start(containerObj);
+ }
+
+ @Override
+ public void restartWithKill(Object containerObj) {
kill(containerObj);
start(containerObj);
}
@@ -278,6 +300,40 @@ public abstract class ContainerService {
GenericContainer genericContainer = (GenericContainer) container;
return "tcp://" + genericContainer.getHost() + ":" + genericContainer.getMappedPort(port);
}
+
+ @Override
+ public Object newZookeeperImage() {
+ return new GenericContainer<>(DockerImageName.parse("zookeeper:latest"));
+ }
+
+ @Override
+ public void withEnvVar(Object container, String varName, String varValue) {
+ ((GenericContainer)container).withEnv(varName, varValue);
+ }
+
+ @Override
+ public void pause(Object containerObj) {
+ GenericContainer container = (GenericContainer) containerObj;
+ container.getDockerClient().pauseContainerCmd(container.getContainerId()).exec();
+ }
+
+ @Override
+ public void unpause(Object containerObj) {
+ GenericContainer container = (GenericContainer) containerObj;
+ container.getDockerClient().unpauseContainerCmd(container.getContainerId()).exec();
+ }
+
+ @Override
+ public String getStatus(Object containerObj) {
+ GenericContainer container = (GenericContainer) containerObj;
+ return container.getDockerClient().inspectContainerCmd(container.getContainerId()).exec().getState().getStatus();
+ }
+
+ @Override
+ public String getHost(Object container) {
+ return ((GenericContainer)container).getHost();
+ }
+
}
}
diff --git a/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/common/E2ETestBase.java b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/common/E2ETestBase.java
new file mode 100644
index 0000000..8052e77
--- /dev/null
+++ b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/common/E2ETestBase.java
@@ -0,0 +1,49 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.tests.e2e.common;
+
+import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
+
+public class E2ETestBase extends ActiveMQTestBase {
+
+ public static final String basedir = System.getProperty("basedir");
+
+ protected static final void recreateBrokerDirectory(final String homeInstance) {
+ recreateDirectory(homeInstance + "/data");
+ recreateDirectory(homeInstance + "/log");
+ }
+
+ public boolean waitForServerToStart(String uri, String username, String password, long timeout) throws InterruptedException {
+ long realTimeout = System.currentTimeMillis() + timeout;
+ while (System.currentTimeMillis() < realTimeout) {
+ try (ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactory(uri, null)) {
+ cf.createConnection(username, password).close();
+ System.out.println("server " + uri + " started");
+ } catch (Exception e) {
+ System.out.println("awaiting server " + uri + " start at ");
+ Thread.sleep(500);
+ continue;
+ }
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/ha/replication/pluggablequorumvote/GCPauseSimulationTests.java b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/ha/replication/pluggablequorumvote/GCPauseSimulationTests.java
new file mode 100644
index 0000000..38e0b52
--- /dev/null
+++ b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/ha/replication/pluggablequorumvote/GCPauseSimulationTests.java
@@ -0,0 +1,328 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.tests.e2e.ha.replication.pluggablequorumvote;
+
+import javax.jms.Connection;
+import javax.jms.DeliveryMode;
+import javax.jms.JMSException;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.management.remote.JMXServiceURL;
+import java.io.File;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
+import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder;
+import org.apache.activemq.artemis.tests.e2e.common.E2ETestBase;
+import org.apache.activemq.artemis.tests.smoke.utils.Jmx;
+import org.apache.commons.io.FileUtils;
+import org.apache.qpid.jms.JmsConnectionFactory;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+public class GCPauseSimulationTests extends PluggableQuorumVoteTestBase {
+
+ private static final String PRIMARY_LOCATION = E2ETestBase.basedir + "/target/ha/replication/pluggablequorumvote/primary";
+ private static final String BACKUP_LOCATION = E2ETestBase.basedir + "/target/ha/replication/pluggablequorumvote/backup";
+ private static final String ARTEMIS_PRIMARY_NAME = "artemis-primary";
+ private static final String ARTEMIS_BACKUP_NAME = "artemis-backup";
+ private static final String CONNECTION_USER = "artemis";
+ private static final String CONNECTION_PASSWORD = "artemis";
+
+ private static final String CLIENT_QUEUE_NAME = "queueA";
+ private static final String TEXT_MESSAGE = "test message - ";
+
+ private Object artemisPrimary;
+ private Object artemisBackup;
+ private JMXServiceURL artemisPrimaryJmxServiceURL;
+ private JMXServiceURL artemisBackupJmxServiceURL;
+ private ObjectNameBuilder artemisPrimaryJmxObjBuilder;
+ private ObjectNameBuilder artemisBackupJmxObjBuilder;
+
+ @Before
+ public void setup() throws Exception {
+ // Start artemis primary and backup
+ artemisPrimary = service.newBrokerImage();
+ artemisBackup = service.newBrokerImage();
+ service.setNetwork(artemisPrimary, network);
+ service.setNetwork(artemisBackup, network);
+ service.exposePorts(artemisPrimary, 8161, 61616, 1099);
+ service.exposePorts(artemisBackup, 8161, 61616, 1099);
+ service.prepareInstance(PRIMARY_LOCATION);
+ service.prepareInstance(BACKUP_LOCATION);
+ service.exposeBrokerHome(artemisPrimary, PRIMARY_LOCATION);
+ service.exposeBrokerHome(artemisBackup, BACKUP_LOCATION);
+ service.exposeHosts(artemisPrimary, ARTEMIS_PRIMARY_NAME);
+ service.exposeHosts(artemisBackup, ARTEMIS_BACKUP_NAME);
+ service.logWait(artemisBackup, ".*AMQ221031: backup announced\\n");
+
+ service.startLogging(artemisPrimary, ARTEMIS_PRIMARY_NAME + " - ");
+ service.startLogging(artemisBackup, ARTEMIS_BACKUP_NAME + " - ");
+
+ service.start(artemisPrimary);
+ service.start(artemisBackup);
+
+ // Wait primary to start to accept connections
+ service.waitForServerToStart(artemisPrimary, CONNECTION_USER, CONNECTION_PASSWORD, 10_000);
+
+ // define some fields with artemis primary and backup info
+ artemisPrimaryJmxServiceURL = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + service.getHost(artemisPrimary) + ":" + service.getPort(artemisPrimary, 1099) + "/jmxrmi");
+ artemisBackupJmxServiceURL = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + service.getHost(artemisBackup) + ":" + service.getPort(artemisBackup, 1099) + "/jmxrmi");
+ artemisPrimaryJmxObjBuilder = ObjectNameBuilder.create(ActiveMQDefaultConfiguration.getDefaultJmxDomain(), ARTEMIS_PRIMARY_NAME, true);
+ artemisBackupJmxObjBuilder = ObjectNameBuilder.create(ActiveMQDefaultConfiguration.getDefaultJmxDomain(), ARTEMIS_BACKUP_NAME, true);
+ }
+
+ @After
+ public void teardown() throws IOException {
+ service.stop(artemisBackup);
+ FileUtils.cleanDirectory(new File(BACKUP_LOCATION + "/data"));
+ FileUtils.cleanDirectory(new File(BACKUP_LOCATION + "/lock"));
+ FileUtils.cleanDirectory(new File(BACKUP_LOCATION + "/log"));
+ FileUtils.cleanDirectory(new File(BACKUP_LOCATION + "/tmp"));
+ service.stop(artemisPrimary);
+ FileUtils.cleanDirectory(new File(PRIMARY_LOCATION + "/data"));
+ FileUtils.cleanDirectory(new File(PRIMARY_LOCATION + "/lock"));
+ FileUtils.cleanDirectory(new File(PRIMARY_LOCATION + "/log"));
+ FileUtils.cleanDirectory(new File(PRIMARY_LOCATION + "/tmp"));
+ }
+
+ @Test
+ public void scenario1aTest() throws Exception {
+
+ int lastProducedMessage = 0;
+ int lastConsumedMessage = 0;
+ int totalMessages = 600;
+
+ // ensure artemis-primary is the live
+ Assert.assertEquals(true, Jmx.isActive(artemisPrimaryJmxServiceURL, artemisPrimaryJmxObjBuilder).orElse(false));
+
+ // ensure artemis-backup is the backup
+ Assert.assertEquals(true, Jmx.isBackup(artemisBackupJmxServiceURL, artemisBackupJmxObjBuilder).orElse(false));
+
+ // client start to produce message on primary
+ lastProducedMessage = produce(totalMessages / 2, lastProducedMessage);
+ Assert.assertEquals(totalMessages / 2, lastProducedMessage);
+
+ // ensure client can consume (just a few) messages from primary
+ lastConsumedMessage = consume(lastProducedMessage / 3, lastConsumedMessage);
+ Assert.assertEquals(lastProducedMessage / 3, lastConsumedMessage);
+
+ // ensure replica is in sync
+ Assert.assertTrue(isReplicaInSync());
+
+ // pause the artemis-primary
+ service.pause(artemisPrimary);
+ Assert.assertEquals("paused", service.getStatus(artemisPrimary));
+
+ // wait artemis-backup start to accept connections and became the live
+ service.waitForServerToStart(artemisBackup, CONNECTION_USER, CONNECTION_PASSWORD, 40_000);
+ TimeUnit.SECONDS.sleep(10);
+
+ // ensure artemis-backup is live
+ Assert.assertEquals(true, Jmx.isActive(artemisBackupJmxServiceURL, artemisBackupJmxObjBuilder).orElse(false));
+
+ // client should be able to produce messages to backup
+ lastProducedMessage += produce(totalMessages / 2, lastProducedMessage);
+ Assert.assertEquals(totalMessages, lastProducedMessage);
+
+ // client should be able to consume messages from backup
+ lastConsumedMessage += consume(lastProducedMessage / 6, lastConsumedMessage);
+ Assert.assertEquals(lastProducedMessage / 3, lastConsumedMessage);
+
+ // unpause the artemis-primary
+ service.unpause(artemisPrimary);
+ Assert.assertEquals("running", service.getStatus(artemisPrimary));
+
+ // wait artemis-primary shutdown
+ TimeUnit.SECONDS.sleep(5);
+
+ // artemis-primary should shutdown yourself as the journal has changed since it was paused.
+ Assert.assertEquals("exited", service.getStatus(artemisPrimary));
+
+ // restart artemis-primary
+ service.restartWithStop(artemisPrimary);
+
+ // wait for artemis-primary to accept connections
+ service.waitForServerToStart(artemisPrimary, CONNECTION_USER, CONNECTION_PASSWORD, 20_000);
+ TimeUnit.SECONDS.sleep(10);
+
+ // ensure artemis-primary is the live
+ artemisPrimaryJmxServiceURL = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + service.getHost(artemisPrimary) + ":" + service.getPort(artemisPrimary, 1099) + "/jmxrmi");
+ Assert.assertEquals(true, Jmx.isActive(artemisPrimaryJmxServiceURL, artemisPrimaryJmxObjBuilder).orElse(false));
+
+ // ensure artemis-backup is the backup
+ Assert.assertEquals(true, Jmx.isBackup(artemisBackupJmxServiceURL, artemisBackupJmxObjBuilder).orElse(false));
+
+ // ensure replica is in sync
+ Assert.assertTrue(isReplicaInSync());
+
+ // ensure all remaining produced messages were consumed from primary.
+ lastConsumedMessage += consume((lastProducedMessage - lastConsumedMessage), lastConsumedMessage);
+ Assert.assertEquals(totalMessages, lastConsumedMessage);
+
+ }
+
+ @Test
+ public void scenario1bTest() throws Exception {
+
+ int lastProducedMessage = 0;
+ int lastConsumedMessage = 0;
+ int totalMessages = 600;
+
+ // ensure artemis-primary is the live
+ Assert.assertEquals(true, Jmx.isActive(artemisPrimaryJmxServiceURL, artemisPrimaryJmxObjBuilder).orElse(false));
+
+ // ensure artemis-backup is the backup
+ Assert.assertEquals(true, Jmx.isBackup(artemisBackupJmxServiceURL, artemisBackupJmxObjBuilder).orElse(false));
+
+ // client start to produce message on primary
+ lastProducedMessage = produce(totalMessages / 2, lastProducedMessage);
+ Assert.assertEquals(totalMessages / 2, lastProducedMessage);
+
+ // ensure client can consume (just a few) messages from primary
+ lastConsumedMessage = consume(lastProducedMessage / 3, lastConsumedMessage);
+ Assert.assertEquals(lastProducedMessage / 3, lastConsumedMessage);
+
+ // ensure replica is in sync
+ Assert.assertTrue(isReplicaInSync());
+
+ // pause the artemis-primary
+ service.pause(artemisPrimary);
+ Assert.assertEquals("paused", service.getStatus(artemisPrimary));
+
+ // wait artemis-backup start to accept connections and became the live
+ service.waitForServerToStart(artemisBackup, CONNECTION_USER, CONNECTION_PASSWORD, 40_000);
+ TimeUnit.SECONDS.sleep(10);
+
+ // ensure artemis-backup is live
+ Assert.assertEquals(true, Jmx.isActive(artemisBackupJmxServiceURL, artemisBackupJmxObjBuilder).orElse(false));
+
+ // client should be able to produce messages to backup
+ lastProducedMessage += produce(totalMessages / 2, lastProducedMessage);
+ Assert.assertEquals(totalMessages, lastProducedMessage);
+
+ // client should be able to consume messages from backup
+ lastConsumedMessage += consume(lastProducedMessage / 6, lastConsumedMessage);
+ Assert.assertEquals(lastProducedMessage / 3, lastConsumedMessage);
+
+ // unpause the artemis-primary
+ service.unpause(artemisPrimary);
+ Assert.assertEquals("running", service.getStatus(artemisPrimary));
+
+ // wait artemis-primary shutdown
+ TimeUnit.SECONDS.sleep(5);
+
+ // artemis-primary should shutdown yourself as the journal has changed since it was paused.
+ Assert.assertEquals("exited", service.getStatus(artemisPrimary));
+
+ // kill artemis-backup
+ service.kill(artemisBackup);
+
+ //update artemis-primary log message as it should not be live
+ service.logWait(artemisPrimary, ".*Not a candidate for NodeID.*");
+
+ // restart artemis-primary
+ service.restartWithStop(artemisPrimary);
+
+ // restart artemis-backup
+ service.start(artemisBackup);
+
+ // wait for artemis-primary to became live again and accept connections
+ service.waitForServerToStart(artemisPrimary, CONNECTION_USER, CONNECTION_PASSWORD, 20_000);
+
+ // ensure artemis-primary is the live
+ artemisPrimaryJmxServiceURL = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + service.getHost(artemisPrimary) + ":" + service.getPort(artemisPrimary, 1099) + "/jmxrmi");
+ Assert.assertEquals(true, Jmx.isActive(artemisPrimaryJmxServiceURL, artemisPrimaryJmxObjBuilder).orElse(false));
+
+ // ensure artemis-backup is the backup
+ artemisBackupJmxServiceURL = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + service.getHost(artemisBackup) + ":" + service.getPort(artemisBackup, 1099) + "/jmxrmi");
+ Assert.assertEquals(true, Jmx.isBackup(artemisBackupJmxServiceURL, artemisBackupJmxObjBuilder).orElse(false));
+
+ // ensure replica is in sync
+ Assert.assertTrue(isReplicaInSync());
+
+ // ensure all remaining produced messages were consumed from primary.
+ lastConsumedMessage += consume((lastProducedMessage - lastConsumedMessage), lastConsumedMessage);
+ Assert.assertEquals(totalMessages, lastConsumedMessage);
+
+ }
+
+ private boolean isReplicaInSync() throws Exception {
+ for (int i = 0; i < 10; i++) {
+ if (Jmx.isReplicaSync(artemisPrimaryJmxServiceURL, artemisPrimaryJmxObjBuilder).orElse(false)) {
+ return true;
+ }
+ System.out.println("Replica is not in sync, waiting 1s and try again");
+ TimeUnit.SECONDS.sleep(1);
+ }
+ return false;
+ }
+
+ private int produce(int numOfMessages, int lastProduced) throws JMSException {
+ JmsConnectionFactory producerCF = new JmsConnectionFactory(CONNECTION_USER, CONNECTION_PASSWORD, getClientURL());
+ Connection producerConnection = producerCF.createConnection(CONNECTION_USER, CONNECTION_PASSWORD);
+ Session producerSession = producerConnection.createSession(true, Session.SESSION_TRANSACTED);
+ Queue producerQueue = producerSession.createQueue(CLIENT_QUEUE_NAME);
+ MessageProducer producer = producerSession.createProducer(producerQueue);
+
+ int producedCounter = 0;
+ while (producedCounter < numOfMessages) {
+ producedCounter++;
+ TextMessage message = producerSession.createTextMessage(TEXT_MESSAGE + (lastProduced + producedCounter));
+ message.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
+ producer.send(message);
+ System.out.println("produced " + message.getText());
+ System.out.println("last produced: " + (lastProduced + producedCounter));
+ }
+ producerSession.commit();
+ producerConnection.close();
+ return producedCounter;
+ }
+
+ private int consume(int numOfMessages, int lastConsumed) throws JMSException {
+ JmsConnectionFactory consumerCF = new JmsConnectionFactory(CONNECTION_USER, CONNECTION_PASSWORD, getClientURL());
+ Connection consumerConnection = consumerCF.createConnection(CONNECTION_USER, CONNECTION_PASSWORD);
+ Session consumerSession = consumerConnection.createSession(true, Session.SESSION_TRANSACTED);
+ Queue consumerQueue = consumerSession.createQueue(CLIENT_QUEUE_NAME);
+ MessageConsumer consumer = consumerSession.createConsumer(consumerQueue);
+ consumerConnection.start();
+
+ int consumedCounter = 0;
+ while (consumedCounter < numOfMessages) {
+ TextMessage message = (TextMessage) consumer.receive(5000);
+ consumedCounter++;
+ Assert.assertNotNull("expected message at " + (lastConsumed + consumedCounter), message);
+ Assert.assertEquals(TEXT_MESSAGE + (lastConsumed + consumedCounter), message.getText());
+ System.out.println("consumed " + message.getText());
+ System.out.println("last consumed: " + (lastConsumed + consumedCounter));
+ }
+ consumerSession.commit();
+ consumerConnection.close();
+ return consumedCounter;
+ }
+
+ private String getClientURL() {
+ return "failover:(amqp://" + service.getHost(artemisPrimary) + ":" + service.getPort(artemisPrimary, 61616) + ",amqp://" + service.getHost(artemisBackup) + ":" + service.getPort(artemisBackup, 61616) + ")?failover.amqpOpenServerListAction=IGNORE";
+ }
+}
diff --git a/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/ha/replication/pluggablequorumvote/PluggableQuorumVoteTestBase.java b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/ha/replication/pluggablequorumvote/PluggableQuorumVoteTestBase.java
new file mode 100644
index 0000000..84f948e
--- /dev/null
+++ b/tests/e2e-tests/src/test/java/org/apache/activemq/artemis/tests/e2e/ha/replication/pluggablequorumvote/PluggableQuorumVoteTestBase.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.tests.e2e.ha.replication.pluggablequorumvote;
+
+import org.apache.activemq.artemis.tests.e2e.common.ContainerService;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+public abstract class PluggableQuorumVoteTestBase {
+
+ protected static ContainerService service;
+ protected static Object network;
+
+ protected static Object zookeeper1;
+ protected static Object zookeeper2;
+ protected static Object zookeeper3;
+ protected static final String ZOOKEEPER_ADMIN_SERVER_START_LOG = ".*Started AdminServer on address.*\\n";
+
+ @BeforeClass
+ public static void init() {
+ service = ContainerService.getService();
+ network = service.newNetwork();
+
+ // Start zookeepers
+ String zkServName1 = "zk1";
+ String zkServName2 = "zk2";
+ String zkServName3 = "zk3";
+ String ZOOKEEPER_SERVERS = "server.1=" + zkServName1 + ":2888:3888;2181 " + "server.2=" + zkServName2 + ":2888:3888;2181 " + "server.3=" + zkServName3 + ":2888:3888;2181";
+ zookeeper1 = service.newZookeeperImage();
+ zookeeper2 = service.newZookeeperImage();
+ zookeeper3 = service.newZookeeperImage();
+ service.setNetwork(zookeeper1, network);
+ service.setNetwork(zookeeper2, network);
+ service.setNetwork(zookeeper3, network);
+ service.exposeHosts(zookeeper1, "zk1");
+ service.exposeHosts(zookeeper2, "zk2");
+ service.exposeHosts(zookeeper3, "zk3");
+ service.withEnvVar(zookeeper1, "ZOO_MY_ID", "1");
+ service.withEnvVar(zookeeper2, "ZOO_MY_ID", "2");
+ service.withEnvVar(zookeeper3, "ZOO_MY_ID", "3");
+ service.withEnvVar(zookeeper1, "ZOO_STANDALONE_ENABLED", "false");
+ service.withEnvVar(zookeeper2, "ZOO_STANDALONE_ENABLED", "false");
+ service.withEnvVar(zookeeper3, "ZOO_STANDALONE_ENABLED", "false");
+ service.withEnvVar(zookeeper1, "ZOO_SERVERS", ZOOKEEPER_SERVERS);
+ service.withEnvVar(zookeeper2, "ZOO_SERVERS", ZOOKEEPER_SERVERS);
+ service.withEnvVar(zookeeper3, "ZOO_SERVERS", ZOOKEEPER_SERVERS);
+
+ service.logWait(zookeeper1, ZOOKEEPER_ADMIN_SERVER_START_LOG);
+ service.logWait(zookeeper2, ZOOKEEPER_ADMIN_SERVER_START_LOG);
+ service.logWait(zookeeper3, ZOOKEEPER_ADMIN_SERVER_START_LOG);
+
+ service.start(zookeeper1);
+ service.start(zookeeper2);
+ service.start(zookeeper3);
+ }
+
+ @AfterClass
+ public static void shutdown() {
+ service.stop(zookeeper3);
+ service.stop(zookeeper2);
+ service.stop(zookeeper1);
+ }
+}
diff --git a/tests/pom.xml b/tests/pom.xml
index 8713c1c..b248346 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -140,6 +140,12 @@
<skipExtraTests>true</skipExtraTests>
</properties>
</profile>
+ <profile>
+ <id>e2e-tests</id>
+ <properties>
+ <skipE2ETests>false</skipE2ETests>
+ </properties>
+ </profile>
</profiles>
<modules>
@@ -155,5 +161,6 @@
<module>performance-tests</module>
<module>artemis-test-support</module>
<module>smoke-tests</module>
+ <module>e2e-tests</module>
</modules>
</project>
diff --git a/tests/smoke-tests/pom.xml b/tests/smoke-tests/pom.xml
index bb574ec..6d0b433 100644
--- a/tests/smoke-tests/pom.xml
+++ b/tests/smoke-tests/pom.xml
@@ -146,16 +146,11 @@
<version>3.141.59</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.testcontainers</groupId>
- <artifactId>testcontainers</artifactId>
- <version>1.15.3</version>
- <scope>test</scope>
- </dependency>
+
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>selenium</artifactId>
- <version>1.15.3</version>
+ <version>1.16.2</version>
<scope>test</scope>
</dependency>
<!-- this dependency is needed for CFUtil and other tools from integration-tests -->
@@ -1042,38 +1037,6 @@
</execution>
<execution>
<phase>test-compile</phase>
- <id>create-dualMirror-serverA</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <role>amq</role>
- <user>artemis</user>
- <password>artemis</password>
- <allowAnonymous>false</allowAnonymous>
- <noWeb>false</noWeb>
- <instance>${basedir}/target/brokerConnect/serverA</instance>
- <configuration>${basedir}/target/classes/servers/brokerConnect/serverA</configuration>
- </configuration>
- </execution>
- <execution>
- <phase>test-compile</phase>
- <id>create-dualMirror-serverB</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <role>amq</role>
- <user>artemis</user>
- <password>artemis</password>
- <allowAnonymous>false</allowAnonymous>
- <noWeb>false</noWeb>
- <instance>${basedir}/target/brokerConnect/serverB</instance>
- <configuration>${basedir}/target/classes/servers/brokerConnect/serverB</configuration>
- </configuration>
- </execution>
- <execution>
- <phase>test-compile</phase>
<id>create-brokerConnection-paged-serverA</id>
<goals>
<goal>create</goal>
@@ -1106,132 +1069,6 @@
</execution>
<execution>
<phase>test-compile</phase>
- <id>create-qdr</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <role>amq</role>
- <user>artemis</user>
- <password>artemis</password>
- <allowAnonymous>false</allowAnonymous>
- <noWeb>false</noWeb>
- <instance>${basedir}/target/brokerConnect/qdr</instance>
- <configuration>${basedir}/target/classes/servers/brokerConnect/qdr</configuration>
- </configuration>
- </execution>
- <execution>
- <phase>test-compile</phase>
- <id>create-bc-replica-main-A</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <instance>${basedir}/target/brokerConnect/replicaMainServerA</instance>
- <configuration>${basedir}/target/classes/servers/brokerConnect/replicaMainServerA</configuration>
- </configuration>
- </execution>
- <execution>
- <phase>test-compile</phase>
- <id>create-bc-replica-backup-A</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <instance>${basedir}/target/brokerConnect/replicaBackupServerA</instance>
- <configuration>${basedir}/target/classes/servers/brokerConnect/replicaBackupServerA</configuration>
- </configuration>
- </execution>
- <execution>
- <phase>test-compile</phase>
- <id>create-bc-replica-main-B</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <instance>${basedir}/target/brokerConnect/replicaMainServerB</instance>
- <configuration>${basedir}/target/classes/servers/brokerConnect/replicaMainServerB</configuration>
- </configuration>
- </execution>
- <execution>
- <phase>test-compile</phase>
- <id>create-bc-replica-backup-B</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <instance>${basedir}/target/brokerConnect/replicaBackupServerB</instance>
- <configuration>${basedir}/target/classes/servers/brokerConnect/replicaBackupServerB</configuration>
- </configuration>
- </execution>
- <execution>
- <phase>test-compile</phase>
- <id>create-bc-dual-root</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <instance>${basedir}/target/brokerConnect/splitMirror/serverRoot</instance>
- <configuration>${basedir}/target/classes/servers/brokerConnect/splitMirror/serverRoot</configuration>
- </configuration>
- </execution>
- <execution>
- <phase>test-compile</phase>
- <id>create-bc-dual-A</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <instance>${basedir}/target/brokerConnect/splitMirror/serverA</instance>
- <configuration>${basedir}/target/classes/servers/brokerConnect/splitMirror/serverA</configuration>
- </configuration>
- </execution>
- <execution>
- <phase>test-compile</phase>
- <id>create-bc-dual-B</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <instance>${basedir}/target/brokerConnect/splitMirror/serverB</instance>
- <configuration>${basedir}/target/classes/servers/brokerConnect/splitMirror/serverB</configuration>
- </configuration>
- </execution>
- <execution>
- <phase>test-compile</phase>
- <id>create-bc-chained-root</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <instance>${basedir}/target/brokerConnect/chainedMirror/serverRoot</instance>
- <configuration>${basedir}/target/classes/servers/brokerConnect/chainedMirror/serverRoot</configuration>
- </configuration>
- </execution>
- <execution>
- <phase>test-compile</phase>
- <id>create-bc-chained-A</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <instance>${basedir}/target/brokerConnect/chainedMirror/serverA</instance>
- <configuration>${basedir}/target/classes/servers/brokerConnect/chainedMirror/serverA</configuration>
- </configuration>
- </execution>
- <execution>
- <phase>test-compile</phase>
- <id>create-bc-chained-B</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <instance>${basedir}/target/brokerConnect/chainedMirror/serverB</instance>
- <configuration>${basedir}/target/classes/servers/brokerConnect/chainedMirror/serverB</configuration>
- </configuration>
- </execution>
- <execution>
- <phase>test-compile</phase>
<id>create-bridge-transfer-A</id>
<goals>
<goal>create</goal>