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 405874898d NO-JIRA removing silly debug message left by accident
405874898d is described below
commit 405874898da6de4ba1f4b8cc85405289954f274a
Author: Clebert Suconic <[email protected]>
AuthorDate: Tue May 6 11:25:28 2025 -0400
NO-JIRA removing silly debug message left by accident
Replacing it by a more "professional" assertion
---
.../tests/unit/core/paging/impl/PageTimedWriterUnitTest.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git
a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PageTimedWriterUnitTest.java
b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PageTimedWriterUnitTest.java
index 7e58d160d4..53a9629046 100644
---
a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PageTimedWriterUnitTest.java
+++
b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/paging/impl/PageTimedWriterUnitTest.java
@@ -93,6 +93,7 @@ public class PageTimedWriterUnitTest extends ArtemisTestCase {
private static final SimpleString ADDRESS = SimpleString.of("someAddress");
+ AtomicInteger outOfContextWrite = new AtomicInteger(0);
ScheduledExecutorService scheduledExecutorService;
ExecutorService executorService;
OrderedExecutorFactory executorFactory;
@@ -189,8 +190,14 @@ public class PageTimedWriterUnitTest extends
ArtemisTestCase {
return numberOfPreparesMessageJournal.incrementAndGet();
}
+ @AfterEach
+ public void validateWrites() {
+ assertEquals(0, outOfContextWrite.get(), "Wrong executor in use at page
writes");
+ }
+
@BeforeEach
public void setupMocks() throws Exception {
+ outOfContextWrite.set(0);
configuration = new ConfigurationImpl();
configuration.setJournalType(JournalType.NIO);
scheduledExecutorService = Executors.newScheduledThreadPool(10);
@@ -284,7 +291,8 @@ public class PageTimedWriterUnitTest extends
ArtemisTestCase {
}
if (!pageStore.getExecutor().inHandler()) {
- logger.warn("WHAT????", new Exception("trace"));
+ logger.warn("directWritePage is not using the correct
executor", new Exception("trace"));
+ outOfContextWrite.incrementAndGet();
}
super.directWritePage(pagedMessage, lineUp, originalReplicated);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact