ARTEMIS-5035 Change some tests to use a random choice for protocol
This commit is contained in:
parent
8b265f4625
commit
daba842984
|
@ -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> 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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue