diff --git a/tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java b/tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java index 0ae7e44fff..aa30952e93 100644 --- a/tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java +++ b/tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java @@ -229,13 +229,12 @@ public abstract class ActiveMQTestBase extends ArtemisTestCase { public ActiveMQTestBase() { } - protected static String randomProtocol() { String[] protocols = {"AMQP", "OPENWIRE", "CORE"}; - - return protocols[org.apache.activemq.artemis.tests.util.RandomUtil.randomPositiveInt() % 3]; + String protocol = protocols[org.apache.activemq.artemis.tests.util.RandomUtil.randomPositiveInt() % 3]; + logger.info("Selecting {} protocol", protocol); + return protocol; } - protected T serialClone(Object object) throws Exception { logger.debug("object::{}", object); ByteArrayOutputStream bout = new ByteArrayOutputStream(); @@ -247,7 +246,6 @@ public abstract class ActiveMQTestBase extends ArtemisTestCase { return (T) obinp.readObject(); } - @AfterEach public void tearDown() throws Exception { try { diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/IdempotentACKTest.java b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/IdempotentACKTest.java index 20745e4257..b9e5200d8b 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/IdempotentACKTest.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/IdempotentACKTest.java @@ -155,13 +155,8 @@ public class IdempotentACKTest extends SoakTestBase { @Test - public void testAMQP() throws Exception { - testACKs("AMQP"); - } - - @Test - public void testCORE() throws Exception { - testACKs("CORE"); + public void testRandomProtocol() throws Exception { + testACKs(randomProtocol()); } private void testACKs(final String protocol) throws Exception { diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/InterruptedLargeMessageTest.java b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/InterruptedLargeMessageTest.java index e32c9ed610..69b078b5be 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/InterruptedLargeMessageTest.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/InterruptedLargeMessageTest.java @@ -145,15 +145,10 @@ public class InterruptedLargeMessageTest extends SoakTestBase { @Test @Timeout(240) - public void testAMQP() throws Exception { - testInterrupt("AMQP"); + public void testRandomProtocol() throws Exception { + testInterrupt(randomProtocol()); } - @Test - @Timeout(240) - public void testCORE() throws Exception { - testInterrupt("CORE"); - } private void preCreateInternalQueues(String serverLocation) throws Exception { Configuration configuration = createDefaultConfig(0, false); diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/PagedSNFSoakTest.java b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/PagedSNFSoakTest.java index d8ccda5db7..cf6347edb8 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/PagedSNFSoakTest.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/brokerConnection/mirror/PagedSNFSoakTest.java @@ -123,19 +123,8 @@ public class PagedSNFSoakTest extends SoakTestBase { @Test @Timeout(240) - public void testAMQP() throws Exception { - testAccumulateAndSend("AMQP"); - } - - @Test - @Timeout(240) - public void testCORE() throws Exception { - testAccumulateAndSend("CORE"); - } - - @Test - public void testOpenWire() throws Exception { - testAccumulateAndSend("OPENWIRE"); + public void testRandomProtocol() throws Exception { + testAccumulateAndSend(randomProtocol()); } private void testAccumulateAndSend(final String protocol) throws Exception { diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/LargeMessageSoakTest.java b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/LargeMessageSoakTest.java index 5fd794e745..57ee449734 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/LargeMessageSoakTest.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/LargeMessageSoakTest.java @@ -58,18 +58,8 @@ public class LargeMessageSoakTest extends ActiveMQTestBase { } @Test - public void testAMQP() throws Exception { - testSendReceive("AMQP"); - } - - @Test - public void testCORE() throws Exception { - testSendReceive("CORE"); - } - - @Test - public void testOpenWire() throws Exception { - testSendReceive("OPENWIRE"); + public void testRandomProtocol() throws Exception { + testSendReceive(randomProtocol()); } public void testSendReceive(String protocol) throws Exception { diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/paging/M_and_M_FactoryTest.java b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/paging/M_and_M_FactoryTest.java index 11cf70feab..dfeb395ee3 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/paging/M_and_M_FactoryTest.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/paging/M_and_M_FactoryTest.java @@ -124,13 +124,8 @@ public class M_and_M_FactoryTest extends SoakTestBase { @Test - public void testM_and_M_AMQP() throws Exception { - test_M_and_M_Sorting( "AMQP", 2000, 2, 2, 500); - } - - @Test - public void testM_and_M_CORE() throws Exception { - test_M_and_M_Sorting( "CORE", 2000, 2, 2, 500); + public void testM_and_M_RandomProtocol() throws Exception { + test_M_and_M_Sorting(randomProtocol(), 2000, 2, 2, 500); } public void test_M_and_M_Sorting(String protocol, int batchSize, int restarts, int clientRuns, int killClientEveryX) throws Exception {