Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/277#discussion_r72638625
--- 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 --
Agreed we should change that. Will it mean that app.start() can return when
the service.isUp still equals false? I believe so - e.g. the `TestCase` just
calls start sequentially on its children, without waiting for service.isUp.
If so, we'll also need to change our test assertions to "eventually".
I'll hold off doing that until another PR.
---
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.
---