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 0ae7e44fff2..aa30952e93c 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 @@ protected void clearServers() { 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 @@ protected T serialClone(Object object) throws Exception { 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 20745e4257b..b9e5200d8b9 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 @@ private void transactSend(Session session, MessageProducer producer, int initial @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 e32c9ed610e..69b078b5be9 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 void cleanupServers() { @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 d8ccda5db77..cf6347edb82 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 void cleanupServers() { @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 5fd794e7455..57ee449734f 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 void setUp() throws Exception { } @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 11cf70feabb..dfeb395ee37 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 void before() throws Exception { @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 {