address code review comments (minor)
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/fa09efce Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/fa09efce Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/fa09efce Branch: refs/heads/master Commit: fa09efce0d7f6b1429923810d3f65ef9bd776ffb Parents: 49a6ef7 Author: Alex Heneveld <alex.henev...@cloudsoftcorp.com> Authored: Thu May 7 18:58:43 2015 +0100 Committer: Alex Heneveld <alex.henev...@cloudsoftcorp.com> Committed: Fri May 8 18:22:23 2015 +0100 ---------------------------------------------------------------------- core/src/main/java/brooklyn/catalog/internal/CatalogDto.java | 1 + .../entity/brooklynnode/BrooklynNodeIntegrationTest.java | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/fa09efce/core/src/main/java/brooklyn/catalog/internal/CatalogDto.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/brooklyn/catalog/internal/CatalogDto.java b/core/src/main/java/brooklyn/catalog/internal/CatalogDto.java index 407cb7c..8888542 100644 --- a/core/src/main/java/brooklyn/catalog/internal/CatalogDto.java +++ b/core/src/main/java/brooklyn/catalog/internal/CatalogDto.java @@ -86,6 +86,7 @@ public class CatalogDto { } /** @deprecated since 0.7.0 the xml format is deprecated; use YAML parse routines on BasicBrooklynCatalog */ + @Deprecated public static CatalogDto newDtoFromXmlContents(String xmlContents, String originDescription) { CatalogDto result = (CatalogDto) new CatalogXmlSerializer().deserialize(new StringReader(xmlContents)); result.contentsDescription = originDescription; http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/fa09efce/software/base/src/test/java/brooklyn/entity/brooklynnode/BrooklynNodeIntegrationTest.java ---------------------------------------------------------------------- diff --git a/software/base/src/test/java/brooklyn/entity/brooklynnode/BrooklynNodeIntegrationTest.java b/software/base/src/test/java/brooklyn/entity/brooklynnode/BrooklynNodeIntegrationTest.java index ff7b5fc..944f286 100644 --- a/software/base/src/test/java/brooklyn/entity/brooklynnode/BrooklynNodeIntegrationTest.java +++ b/software/base/src/test/java/brooklyn/entity/brooklynnode/BrooklynNodeIntegrationTest.java @@ -54,6 +54,7 @@ import brooklyn.entity.brooklynnode.BrooklynNode.StopNodeAndKillAppsEffector; import brooklyn.entity.proxying.EntityProxyImpl; import brooklyn.entity.proxying.EntitySpec; import brooklyn.event.feed.http.JsonFunctions; +import brooklyn.location.MachineLocation; import brooklyn.location.basic.LocalhostMachineProvisioningLocation; import brooklyn.location.basic.Locations; import brooklyn.location.basic.PortRanges; @@ -64,6 +65,7 @@ import brooklyn.util.collections.MutableMap; import brooklyn.util.config.ConfigBag; import brooklyn.util.exceptions.Exceptions; import brooklyn.util.guava.Functionals; +import brooklyn.util.guava.Maybe; import brooklyn.util.http.HttpTool; import brooklyn.util.http.HttpToolResponse; import brooklyn.util.javalang.JavaClassNames; @@ -519,13 +521,15 @@ services: File pidFile = new File(getDriver(brooklynNode).getPidFile()); assertTrue(isPidRunning(pidFile)); + Maybe<MachineLocation> l = Locations.findUniqueMachineLocation(brooklynNode.getLocations()); brooklynNode.invoke(eff, Collections.<String, Object>emptyMap()).getUnchecked(); // Note can't use driver.isRunning to check shutdown; can't invoke scripts on an unmanaged entity EntityTestUtils.assertAttributeEquals(brooklynNode, BrooklynNode.SERVICE_UP, false); - // previously we unmanaged the node on stop, but that behaviour has been removed (noticed May 2015) - // TODO remove this after a couple of months, for awareness/confirmation + + // unmanaged if the machine is destroyed - ie false on localhost (this test by default), but true in the cloud // assertFalse(Entities.isManaged(brooklynNode)); + assertFalse(isPidRunning(pidFile), "pid in "+pidFile+" still running"); }