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 f47d592079 ARTEMIS-3988 Moving MMSFactoryTest under soak-tests
f47d592079 is described below
commit f47d5920796f6a292443a1afc5ee145aeb6779d2
Author: Clebert Suconic <[email protected]>
AuthorDate: Tue Sep 13 12:05:36 2022 -0400
ARTEMIS-3988 Moving MMSFactoryTest under soak-tests
---
tests/smoke-tests/pom.xml | 23 --------
tests/soak-tests/pom.xml | 23 ++++++++
.../main/resources/servers/mmfactory/broker.xml | 0
.../tests/soak/paging/M_and_M_FactoryTest.java} | 61 ++++++++++------------
4 files changed, 50 insertions(+), 57 deletions(-)
diff --git a/tests/smoke-tests/pom.xml b/tests/smoke-tests/pom.xml
index f8c897246b..408822df28 100644
--- a/tests/smoke-tests/pom.xml
+++ b/tests/smoke-tests/pom.xml
@@ -1040,29 +1040,6 @@
<configuration>${basedir}/target/classes/servers/infinite-redelivery</configuration>
</configuration>
</execution>
- <execution>
- <phase>test-compile</phase>
- <id>create-mmfactory</id>
- <goals>
- <goal>create</goal>
- </goals>
- <configuration>
- <!-- this makes it easier in certain envs -->
-
<configuration>${basedir}/target/classes/servers/mmfactory</configuration>
- <allowAnonymous>true</allowAnonymous>
- <user>admin</user>
- <password>admin</password>
- <instance>${basedir}/target/mmfactory</instance>
- <noWeb>false</noWeb>
- <args>
- <arg>--java-options</arg>
- <arg>-Djava.rmi.server.hostname=localhost
-Dcom.sun.management.jmxremote=true
- -Dcom.sun.management.jmxremote.port=11099
-Dcom.sun.management.jmxremote.rmi.port=11098
- -Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
- </arg>
- </args>
- </configuration>
- </execution>
<execution>
<phase>test-compile</phase>
<id>create-brokerConnection-paged-serverA</id>
diff --git a/tests/soak-tests/pom.xml b/tests/soak-tests/pom.xml
index a2a0645006..92d4171694 100644
--- a/tests/soak-tests/pom.xml
+++ b/tests/soak-tests/pom.xml
@@ -149,6 +149,29 @@
</args>
</configuration>
</execution>
+ <execution>
+ <phase>test-compile</phase>
+ <id>create-mmfactory</id>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ <configuration>
+ <!-- this makes it easier in certain envs -->
+
<configuration>${basedir}/target/classes/servers/mmfactory</configuration>
+ <allowAnonymous>true</allowAnonymous>
+ <user>admin</user>
+ <password>admin</password>
+ <instance>${basedir}/target/mmfactory</instance>
+ <noWeb>false</noWeb>
+ <args>
+ <arg>--java-options</arg>
+ <arg>-Djava.rmi.server.hostname=localhost
-Dcom.sun.management.jmxremote=true
+ -Dcom.sun.management.jmxremote.port=11099
-Dcom.sun.management.jmxremote.rmi.port=11098
+ -Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
+ </arg>
+ </args>
+ </configuration>
+ </execution>
</executions>
</plugin>
diff --git a/tests/smoke-tests/src/main/resources/servers/mmfactory/broker.xml
b/tests/soak-tests/src/main/resources/servers/mmfactory/broker.xml
similarity index 100%
rename from tests/smoke-tests/src/main/resources/servers/mmfactory/broker.xml
rename to tests/soak-tests/src/main/resources/servers/mmfactory/broker.xml
diff --git
a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/mmfactory/MMSFactoryTest.java
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/paging/M_and_M_FactoryTest.java
similarity index 92%
rename from
tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/mmfactory/MMSFactoryTest.java
rename to
tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/paging/M_and_M_FactoryTest.java
index 620ef65bb5..f36d4c1db4 100644
---
a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/mmfactory/MMSFactoryTest.java
+++
b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/paging/M_and_M_FactoryTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.activemq.artemis.tests.smoke.mmfactory;
+package org.apache.activemq.artemis.tests.soak.paging;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
@@ -34,8 +34,6 @@ import javax.management.remote.JMXConnector;
import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
-import java.util.Arrays;
-import java.util.Collection;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
@@ -43,7 +41,7 @@ import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder;
import org.apache.activemq.artemis.api.core.management.QueueControl;
-import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
+import org.apache.activemq.artemis.tests.soak.SoakTestBase;
import org.apache.activemq.artemis.tests.util.CFUtil;
import org.apache.activemq.artemis.utils.RandomUtil;
import org.apache.activemq.artemis.utils.SpawnedVMSupport;
@@ -51,47 +49,27 @@ import org.apache.activemq.artemis.utils.Wait;
import org.jboss.logging.Logger;
import org.junit.Before;
import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-@RunWith(Parameterized.class)
-public class MMSFactoryTest extends SmokeTestBase {
+public class M_and_M_FactoryTest extends SoakTestBase {
- private static final Logger logger = Logger.getLogger(MMSFactoryTest.class);
+ private static final Logger logger =
Logger.getLogger(M_and_M_FactoryTest.class);
public static final String SERVER_NAME_0 = "mmfactory";
private static final String JMX_SERVER_HOSTNAME = "localhost";
private static final int JMX_SERVER_PORT = 11099;
- final String theprotocol;
- final int BATCH_SIZE;
+ String theprotocol;
+ int BATCH_SIZE;
// how many times the server will be restarted
- final int restarts;
+ int restarts;
// how many times the clients will run per restart
- final int clientRuns;
+ int clientRuns;
// As the produces sends messages, a client will be killed every X
messages. This is it!
- final int killClientEveryX;
-
-
- @Parameterized.Parameters(name = "protocol={0}, batchSize={1},
restarts={2}, clientRuns={3}, killEveryX={4}")
- public static Collection<Object[]> parameters() {
- return Arrays.asList(new Object[][]{{"CORE", 2000, 2, 2, 500}, {"AMQP",
2000, 2, 2, 500}});
- }
-
- public MMSFactoryTest(String protocol, int batchSize, int restarts, int
clientRuns, int killClientEveryX) {
- this.theprotocol = protocol;
- this.BATCH_SIZE = batchSize;
- this.restarts = restarts;
- this.clientRuns = clientRuns;
- this.killClientEveryX = killClientEveryX;
- }
-
+ int killClientEveryX;
public static void main(String[] arg) {
-
try {
Consumer consumer = new Consumer(arg[0], Integer.parseInt(arg[1]),
arg[2], Integer.parseInt(arg[3]), arg[4], Integer.parseInt(arg[5]));
- //consumer.run();
consumer.runListener();
while (true) {
@@ -112,7 +90,7 @@ public class MMSFactoryTest extends SmokeTestBase {
int credits,
int consumerID) throws Exception {
- return SpawnedVMSupport.spawnVM(MMSFactoryTest.class.getName(),
protocol, "" + slowTime, queueName, "" + credits, getConsumerLog(consumerID),
"" + consumerID);
+ return SpawnedVMSupport.spawnVM(M_and_M_FactoryTest.class.getName(),
protocol, "" + slowTime, queueName, "" + credits, getConsumerLog(consumerID),
"" + consumerID);
}
Process serverProcess;
@@ -124,8 +102,23 @@ public class MMSFactoryTest extends SmokeTestBase {
serverProcess = startServer(SERVER_NAME_0, 0, 30000);
}
+
+ @Test
+ public void testM_and_M_AMQP() throws Exception {
+ test_M_and_M_Sorting( "AMQP", 2000, 2, 2, 500);
+ }
+
@Test
- public void testMMSorting() throws Exception {
+ public void testM_and_M_CORE() throws Exception {
+ test_M_and_M_Sorting( "CORE", 2000, 2, 2, 500);
+ }
+
+ public void test_M_and_M_Sorting(String protocol, int batchSize, int
restarts, int clientRuns, int killClientEveryX) throws Exception {
+ this.theprotocol = protocol;
+ this.BATCH_SIZE = batchSize;
+ this.restarts = restarts;
+ this.clientRuns = clientRuns;
+ this.killClientEveryX = killClientEveryX;
for (int i = 0; i < restarts; i++) {
logger.debug("*******************************************************************************************************************************");
logger.debug("Starting " + clientRuns);
@@ -143,7 +136,7 @@ public class MMSFactoryTest extends SmokeTestBase {
}
}
- public void testMMSorting(int countStart, int countEnd) throws Exception {
+ private void testMMSorting(int countStart, int countEnd) throws Exception {
JMXConnector jmxConnector = getJmxConnector(JMX_SERVER_HOSTNAME,
JMX_SERVER_PORT);