activemq git commit: no-jira - fix intermittent test failure when cron falls on next minute

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

activemq git commit: no-jira - fix intermittent test failure when cron falls on next minute

gtully-2
Repository: activemq
Updated Branches:
  refs/heads/master f2cde24a6 -> 82dec402a


no-jira - fix intermittent test failure when cron falls on next minute


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/82dec402
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/82dec402
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/82dec402

Branch: refs/heads/master
Commit: 82dec402aad8a7739e99b80a629c2c1ec6e51a60
Parents: f2cde24
Author: gtully <[hidden email]>
Authored: Mon Nov 5 16:33:34 2018 +0000
Committer: gtully <[hidden email]>
Committed: Mon Nov 5 16:33:34 2018 +0000

----------------------------------------------------------------------
 .../src/test/java/org/apache/activemq/bugs/AMQ6463Test.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/82dec402/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ6463Test.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ6463Test.java b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ6463Test.java
index 2bbdb68..31e1ec1 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ6463Test.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ6463Test.java
@@ -28,6 +28,7 @@ import org.apache.activemq.broker.region.policy.VMPendingQueueMessageStoragePoli
 import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.util.DefaultTestAppender;
+import org.apache.activemq.util.IOHelper;
 import org.apache.activemq.util.Wait;
 import org.apache.log4j.Level;
 import org.apache.log4j.spi.LoggingEvent;
@@ -64,7 +65,6 @@ public class AMQ6463Test extends JmsTestSupport {
         TextMessage message = session.createTextMessage("test msg");
         final int numMessages = 20;
 
-        message.setStringProperty(ScheduledMessage.AMQ_SCHEDULED_CRON, "* * * * *");
         message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, 0);
         message.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_PERIOD, 0);
         message.setIntProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT, numMessages - 1);
@@ -99,6 +99,8 @@ public class AMQ6463Test extends JmsTestSupport {
         service.setSchedulerSupport(true);
         service.setDeleteAllMessagesOnStartup(true);
 
+        IOHelper.deleteChildren(service.getSchedulerDirectoryFile());
+
         service.getSystemUsage().getMemoryUsage().setLimit(512);
 
         // Setup a destination policy where it takes only 1 message at a time.
@@ -118,7 +120,7 @@ public class AMQ6463Test extends JmsTestSupport {
 
     public void setUp() throws Exception {
         setAutoFail(true);
-        DefaultTestAppender appender = new DefaultTestAppender() {
+        appender = new DefaultTestAppender() {
             @Override
             public void doAppend(LoggingEvent event) {
                 if (event.getLevel().equals(Level.ERROR)) {