Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/277#discussion_r72601245
  
    --- Diff: 
test-framework/src/main/java/org/apache/brooklyn/test/framework/TargetableTestComponentImpl.java
 ---
    @@ -116,4 +125,14 @@ private static Entity getTargetById(final 
ExecutionContext executionContext, fin
         protected <T> T getRequiredConfig(ConfigKey<T> key) {
             return checkNotNull(config().get(key), "config %s must not be 
null", key);
         }
    +
    +    protected void setUpAndRunState(boolean up, Lifecycle status) {
    +        if (up) {
    +            sensors().set(SERVICE_UP, up);
    +            setExpectedState(this, status);
    +        } else {
    +            setExpectedState(this, status);
    +            sensors().set(SERVICE_UP, up);
    +        }
    --- End diff --
    
    As you are updating this anyway would be nice to make the `service.isUp` + 
`service.state` managed through the notUp + problems maps, instead of directly. 
    Current approach is valid as well so happy to go this way if you think it's 
out of scope.


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

Reply via email to