From 814a286dfe64bfde749e54b8552b5197abe97b37 Mon Sep 17 00:00:00 2001 From: "Christopher L. Shannon (cshannon)" Date: Fri, 14 Jun 2019 10:28:57 -0400 Subject: [PATCH] AMQ-7221 - Fix InMemoryJobSchedulerManagementTest that was broken after patch --- .../broker/scheduler/JobSchedulerManagementTest.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerManagementTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerManagementTest.java index 5d80c0558b..b1f3b2e816 100644 --- a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerManagementTest.java +++ b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/scheduler/JobSchedulerManagementTest.java @@ -60,8 +60,10 @@ public class JobSchedulerManagementTest extends JobSchedulerTestSupport { @Override protected BrokerService createBroker() throws Exception { BrokerService brokerService = createBroker(true); - ((JobSchedulerStoreImpl) brokerService.getJobSchedulerStore()).setCleanupInterval(500); - ((JobSchedulerStoreImpl) brokerService.getJobSchedulerStore()).setJournalMaxFileLength(100* 1024); + if (isPersistent()) { + ((JobSchedulerStoreImpl) brokerService.getJobSchedulerStore()).setCleanupInterval(500); + ((JobSchedulerStoreImpl) brokerService.getJobSchedulerStore()).setJournalMaxFileLength(100 * 1024); + } return brokerService; } @@ -102,7 +104,10 @@ public class JobSchedulerManagementTest extends JobSchedulerTestSupport { // Now wait and see if any get delivered, none should. latch.await(10, TimeUnit.SECONDS); assertEquals(latch.getCount(), COUNT); - assertEquals(1, getNumberOfJournalFiles()); + + if (isPersistent()) { + assertEquals(1, getNumberOfJournalFiles()); + } connection.close(); }