You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2024/06/13 14:22:06 UTC

(activemq-artemis) branch main updated: NO-JIRA ReplayTest paging tests

This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 106418dc74 NO-JIRA ReplayTest paging tests
106418dc74 is described below

commit 106418dc74249ffe2173ab95068bbb15213cb0db
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Thu Jun 13 10:06:36 2024 -0400

    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.
---
 .../tests/integration/retention/ReplayTest.java    | 24 +++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/retention/ReplayTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/retention/ReplayTest.java
index 53601c4c38..51fa2b1c5f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/retention/ReplayTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/retention/ReplayTest.java
@@ -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);
    }
 
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@activemq.apache.org
For additional commands, e-mail: commits-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact