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 9bac93e25e ARTEMIS-4248 Fixing PagingTest::testSimpleResume
9bac93e25e is described below

commit 9bac93e25eaead24d357c063e0621cbb7e22692f
Author: Clebert Suconic <[email protected]>
AuthorDate: Fri Apr 21 11:19:02 2023 -0400

    ARTEMIS-4248 Fixing PagingTest::testSimpleResume
    
    testSimpleResume is intermittently failing.
    This test is forcing another page, while cleanup is happening on the 
background.
    ForceAnotherPage may not put the address back into paging if this happened 
right after the cleanup call.
    To fix the test, we should call startPaging after forceAnotherPage is 
called.
---
 .../apache/activemq/artemis/tests/integration/paging/PagingTest.java   | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingTest.java
 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingTest.java
index fd48e412fd..bb878b420f 100644
--- 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingTest.java
+++ 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingTest.java
@@ -1192,6 +1192,9 @@ public class PagingTest extends ActiveMQTestBase {
          for (int i = 0; i < numberOfMessages; i++) {
             if (i % 10 == 0 && i > 0) {
                queue.getPagingStore().forceAnotherPage();
+               // forceAnotherPage could be called concurrently with cleanup 
on this case
+               // so we have to call startPaging to make sure we are still 
paging on this test
+               queue.getPagingStore().startPaging();
                page++;
             }
             message = session.createMessage(true);

Reply via email to