brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-291) Manually setting service.isUp is overwritten by enricher (causing non-deterministic test failures)
Date Tue, 07 Jun 2016 23:07:20 GMT

    [ https://issues.apache.org/jira/browse/BROOKLYN-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15319649#comment-15319649
] 

ASF GitHub Bot commented on BROOKLYN-291:
-----------------------------------------

Github user ahgittin commented on the issue:

    https://github.com/apache/brooklyn-server/pull/187
  
    looks sensible.  hopefully jenkins concurs!
    
    nice job tracking this down.


> Manually setting service.isUp is overwritten by enricher (causing non-deterministic test
failures)
> --------------------------------------------------------------------------------------------------
>
>                 Key: BROOKLYN-291
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-291
>             Project: Brooklyn
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Aled Sage
>
> If one creates an entity and explicitly sets its service.isUp to true, then the default
enrichers can override this value to remove it. This is because it is executing concurrently,
and if service-up-indicators is null then it removes the service.isUp sensor value!
> A similar thing happens for the service.state sensor.
> This is non-deterministic, but can be demonstrate with this simple test:
> {noformat}
> for (int i = 0; i < 100; i++) {
>     TestEntity entity = app.addChild(EntitySpec.create(TestEntity.class));
>     entity.sensors().set(TestEntity.SERVICE_UP, true);
>     entity.sensors().set(TestEntity.SERVICE_STATE_ACTUAL, Lifecycle.RUNNING);
>     Thread.sleep(10);
>     assertEquals(entity.sensors().get(TestEntity.SERVICE_UP), Boolean.TRUE);
>     assertEquals(entity.sensors().get(TestEntity.SERVICE_STATE_ACTUAL), Lifecycle.RUNNING);
> }
> {noformat}
> Most entities don't explicitly set the service.isUp, so it has not been a problem in
production systems. However, it does impact tests - it is the likely cause of many non-deterministic
test failures.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message