NO-JIRA ReplayTest paging tests

No semantic changes in this commit,
I was just exploring the possibility of
issues with paging and large messages combined
and I decided to keep the test.
This commit is contained in:
Clebert Suconic 2024-06-13 10:06:36 -04:00
parent 7f038de9ad
commit 106418dc74
1 changed files with 19 additions and 5 deletions

View File

@ -62,15 +62,15 @@ public class ReplayTest extends ActiveMQTestBase {
@Test
public void testReplayAMQP() throws Exception {
testReplay("AMQP", 10);
testReplay("AMQP", 10, false);
}
@Test
public void testReplayCore() throws Exception {
testReplay("CORE", 10);
testReplay("CORE", 10, false);
}
public void testReplay(String protocol, int size) throws Exception {
protected void testReplay(String protocol, int size, boolean paging) throws Exception {
StringBuffer buffer = new StringBuffer();
buffer.append(RandomUtil.randomString());
@ -78,6 +78,11 @@ public class ReplayTest extends ActiveMQTestBase {
buffer.append("*");
}
if (paging) {
org.apache.activemq.artemis.core.server.Queue serverQueue = server.locateQueue("t1");
serverQueue.getPagingStore().startPaging();
}
ConnectionFactory cf = CFUtil.createConnectionFactory(protocol, "tcp://localhost:61616");
try (Connection connection = cf.createConnection()) {
@ -129,12 +134,21 @@ public class ReplayTest extends ActiveMQTestBase {
@Test
public void testReplayLargeAMQP() throws Exception {
testReplay("AMQP", 500 * 1024);
testReplay("AMQP", 500 * 1024, false);
}
@Test
public void testReplayLargeCore() throws Exception {
testReplay("CORE", 500 * 1024);
testReplay("CORE", 500 * 1024, false);
}
@Test
public void testReplayCorePaging() throws Exception {
testReplay("CORE", 10, true);
}
@Test
public void testReplayLargeCorePaging() throws Exception {
testReplay("CORE", 500 * 1024, true);
}
}