brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] incubator-brooklyn pull request: Fixing jenkins failures
Date Tue, 07 Oct 2014 08:34:10 GMT
Github user aledsage commented on a diff in the pull request:
    --- Diff: core/src/test/java/brooklyn/management/internal/
    @@ -131,9 +133,19 @@ protected void forceGc() {
             return Tasks.builder().name(name).dynamic(false).body(Callables.returning(null));
    -    protected static void assertTaskCountForEntity(Entity entity, int expectedCount)
    -        Collection<Task<?>> tasks = BrooklynTaskTags.getTasksInEntityContext(((EntityInternal)entity).getManagementContext().getExecutionManager(),
    -        Assert.assertEquals(tasks.size(), expectedCount, "Tasks were "+tasks);
    +    protected void assertTaskCountForEntitySoon(final Entity entity, final int expectedCount)
    +        // Dead task (and initialization task) should have been GC'd on completion.
    +        // However, the GC'ing happens in a listener, executed in a different thread
- the task.get()
    +        // doesn't block for it. Therefore can't always guarantee it will be GC'ed by
    +        Repeater.create().backoff(Duration.millis(10), 2, Duration.millis(500)).limitTimeTo(Duration.TEN_SECONDS).until(new
Callable<Boolean>() {
    +            @Override
    +            public Boolean call() throws Exception {
    +                forceGc();
    --- End diff --
    Do we really need to call `forceGc()`? If the comment `Dead task (and initialization task)
should have been GC'd on completion` is correct then presumably not. But I'm guessing this
method is now used in more places so the comment is no longer applicable?

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 or file a JIRA ticket
with INFRA.

View raw message