Github user sjcorbett commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/735#discussion_r34247974
--- Diff:
software/webapp/src/test/java/brooklyn/test/entity/TestJavaWebAppEntityImpl.java
---
@@ -91,4 +73,25 @@ public int getB() {
public int getC() {
return c;
}
+
+ @Override
+ protected SoftwareProcessDriverLifecycleEffectorTasks
getLifecycleEffectorTasks() {
+ return new SoftwareProcessDriverLifecycleEffectorTasks() {
+ public void start(java.util.Collection<? extends Location>
locations) {
+ ServiceStateLogic.setExpectedState(entity(),
Lifecycle.STARTING);
+ LOG.trace("Starting {}", this);
+ entity().setAttribute(SERVICE_PROCESS_IS_RUNNING, true);
+ entity().setAttribute(Attributes.SERVICE_UP, true);
+ ServiceStateLogic.setExpectedState(entity(),
Lifecycle.RUNNING);
+ }
+
+ public void stop() {
+ ServiceStateLogic.setExpectedState(entity(),
Lifecycle.STOPPING);
+ LOG.trace("Stopping {}", this);
+ entity().setAttribute(Attributes.SERVICE_UP, false);
+ entity().setAttribute(SERVICE_PROCESS_IS_RUNNING, false);
+ ServiceStateLogic.setExpectedState(entity(),
Lifecycle.STOPPED);
+ }
+ };
+ }
--- End diff --
Or just alter `TestJavaWebAppEntity` to set the default to this subclass?
---
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.
---