ARTEMIS-5035 M_and_M_FactoryTest cannot use OpenWire as it's using JMS2

This commit is contained in:
Clebert Suconic 2024-09-18 11:33:05 -04:00
parent b79db8ed66
commit 7860fd5fa9
2 changed files with 8 additions and 3 deletions

View File

@ -229,12 +229,17 @@ public abstract class ActiveMQTestBase extends ArtemisTestCase {
public ActiveMQTestBase() {
}
protected static String randomProtocol() {
String[] protocols = {"AMQP", "OPENWIRE", "CORE"};
String protocol = protocols[org.apache.activemq.artemis.tests.util.RandomUtil.randomPositiveInt() % 3];
return randomProtocol("AMQP", "OPENWIRE", "CORE");
}
protected static String randomProtocol(String...protocols) {
String protocol = protocols[org.apache.activemq.artemis.tests.util.RandomUtil.randomPositiveInt() % protocols.length];
logger.info("Selecting {} protocol", protocol);
return protocol;
}
protected <T> T serialClone(Object object) throws Exception {
logger.debug("object::{}", object);
ByteArrayOutputStream bout = new ByteArrayOutputStream();

View File

@ -125,7 +125,7 @@ public class M_and_M_FactoryTest extends SoakTestBase {
@Test
public void testM_and_M_RandomProtocol() throws Exception {
test_M_and_M_Sorting(randomProtocol(), 2000, 2, 2, 500);
test_M_and_M_Sorting(randomProtocol("AMQP", "CORE"), 2000, 2, 2, 500);
}
public void test_M_and_M_Sorting(String protocol, int batchSize, int restarts, int clientRuns, int killClientEveryX) throws Exception {