set service up before expected running in TestEntity to correct test failures
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/2a4e03ff Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/2a4e03ff Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/2a4e03ff Branch: refs/heads/master Commit: 2a4e03ff0e0c4a257bbd232516f7992d8cdef059 Parents: 1284f91 Author: Alex Heneveld <[email protected]> Authored: Fri Oct 3 15:47:43 2014 +0100 Committer: Alex Heneveld <[email protected]> Committed: Fri Oct 3 16:56:03 2014 +0100 ---------------------------------------------------------------------- core/src/test/java/brooklyn/test/entity/TestEntityImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/2a4e03ff/core/src/test/java/brooklyn/test/entity/TestEntityImpl.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/brooklyn/test/entity/TestEntityImpl.java b/core/src/test/java/brooklyn/test/entity/TestEntityImpl.java index d58aa86..cef1fee 100644 --- a/core/src/test/java/brooklyn/test/entity/TestEntityImpl.java +++ b/core/src/test/java/brooklyn/test/entity/TestEntityImpl.java @@ -126,8 +126,8 @@ public class TestEntityImpl extends AbstractEntity implements TestEntity { ServiceStateLogic.setExpectedState(this, Lifecycle.STARTING); counter.incrementAndGet(); addLocations(locs); - ServiceStateLogic.setExpectedState(this, Lifecycle.RUNNING); setAttribute(SERVICE_UP, true); + ServiceStateLogic.setExpectedState(this, Lifecycle.RUNNING); } @Override @@ -136,8 +136,8 @@ public class TestEntityImpl extends AbstractEntity implements TestEntity { callHistory.add("stop"); ServiceStateLogic.setExpectedState(this, Lifecycle.STOPPING); counter.decrementAndGet(); - ServiceStateLogic.setExpectedState(this, Lifecycle.STOPPED); setAttribute(SERVICE_UP, false); + ServiceStateLogic.setExpectedState(this, Lifecycle.STOPPED); } @Override
