You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/03/04 17:15:53 UTC
[08/18] brooklyn-server git commit: wait for app to reach stopped
state before starting to listen
wait for app to reach stopped state before starting to listen
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/0194d59e
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/0194d59e
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/0194d59e
Branch: refs/heads/master
Commit: 0194d59e286eb587f504903ee2a48b2f4feec06d
Parents: 52c6caf
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Wed Feb 24 12:45:13 2016 -0800
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Wed Feb 24 12:45:13 2016 -0800
----------------------------------------------------------------------
.../java/org/apache/brooklyn/entity/stock/BasicStartableTest.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/0194d59e/core/src/test/java/org/apache/brooklyn/entity/stock/BasicStartableTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/entity/stock/BasicStartableTest.java b/core/src/test/java/org/apache/brooklyn/entity/stock/BasicStartableTest.java
index f257f63..3b847bf 100644
--- a/core/src/test/java/org/apache/brooklyn/entity/stock/BasicStartableTest.java
+++ b/core/src/test/java/org/apache/brooklyn/entity/stock/BasicStartableTest.java
@@ -32,6 +32,7 @@ import org.apache.brooklyn.api.location.LocationSpec;
import org.apache.brooklyn.api.mgmt.ManagementContext;
import org.apache.brooklyn.core.entity.Attributes;
import org.apache.brooklyn.core.entity.Entities;
+import org.apache.brooklyn.core.entity.EntityAsserts;
import org.apache.brooklyn.core.entity.RecordingSensorEventListener;
import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
@@ -148,6 +149,8 @@ public class BasicStartableTest {
@Test
public void testTransitionsThroughLifecycles() throws Exception {
startable = app.addChild(EntitySpec.create(BasicStartable.class));
+ EntityAsserts.assertAttributeEqualsEventually(app, Attributes.SERVICE_STATE_ACTUAL, Lifecycle.STOPPED);
+
RecordingSensorEventListener<Lifecycle> listener = new RecordingSensorEventListener<Lifecycle>(true);
managementContext.getSubscriptionContext(startable)
.subscribe(startable, Attributes.SERVICE_STATE_ACTUAL, listener);