brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: HA test tidy
Date Wed, 02 Jul 2014 14:20:34 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/40#discussion_r14458993
  
    --- Diff: core/src/main/java/brooklyn/management/ha/HighAvailabilityManagerImpl.java ---
    @@ -273,8 +273,15 @@ protected void registerPollTask() {
                 }
             };
             
    -        ScheduledTask task = new ScheduledTask(MutableMap.of("period", pollPeriod), taskFactory);
    -        pollingTask = managementContext.getExecutionManager().submit(task);
    +        if (pollPeriod==null || pollPeriod.equals(Duration.PRACTICALLY_FOREVER)) {
    +            // don't schedule - used for tests
    +            // (scheduling fires off one initial task in the background before the delay,

    +            // which affects tests that want to know exactly when publishing happens;
    +            // TODO would be nice if scheduled task had a "no initial submission" flag
)
    --- End diff --
    
    I'd like it if the scheduled task API was more like the `java.util.concurrent.ScheduledExecutorService`.
But that's off-topic.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message