Fixing tests - brooklyn.entity.brooklynnode.BrooklynEntityMirrorIntegrationTest - brooklyn.entity.basic.VanillaSoftwareYamlTest - brooklyn.demo.RebindWebClusterDatabaseExampleAppIntegrationTest - NginxUrlMappingIntegrationTest - NginxRebindIntegrationTest
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/8babf3d3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/8babf3d3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/8babf3d3 Branch: refs/heads/master Commit: 8babf3d3c4d802aeac07e6989d52c7d16e0d3ad3 Parents: 0cd634d Author: Yavor Yanchev <[email protected]> Authored: Mon Jun 29 12:15:45 2015 +0300 Committer: Yavor Yanchev <[email protected]> Committed: Mon Jun 29 12:15:45 2015 +0300 ---------------------------------------------------------------------- ...lusterDatabaseExampleAppIntegrationTest.java | 8 ++--- .../proxy/nginx/NginxRebindIntegrationTest.java | 24 +++++++------- .../nginx/NginxUrlMappingIntegrationTest.java | 35 +++++++++++--------- .../BrooklynEntityMirrorIntegrationTest.java | 4 +++ .../vanilla-software-with-child-blueprint.yaml | 18 +++++++--- 5 files changed, 53 insertions(+), 36 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8babf3d3/examples/simple-web-cluster/src/test/java/brooklyn/demo/RebindWebClusterDatabaseExampleAppIntegrationTest.java ---------------------------------------------------------------------- diff --git a/examples/simple-web-cluster/src/test/java/brooklyn/demo/RebindWebClusterDatabaseExampleAppIntegrationTest.java b/examples/simple-web-cluster/src/test/java/brooklyn/demo/RebindWebClusterDatabaseExampleAppIntegrationTest.java index d388193..f2c735c 100644 --- a/examples/simple-web-cluster/src/test/java/brooklyn/demo/RebindWebClusterDatabaseExampleAppIntegrationTest.java +++ b/examples/simple-web-cluster/src/test/java/brooklyn/demo/RebindWebClusterDatabaseExampleAppIntegrationTest.java @@ -49,7 +49,7 @@ import brooklyn.entity.rebind.RebindOptions; import brooklyn.entity.rebind.RebindTestFixture; import brooklyn.entity.webapp.ControlledDynamicWebAppCluster; import brooklyn.entity.webapp.DynamicWebAppCluster; -import brooklyn.entity.webapp.jboss.JBoss7Server; +import brooklyn.entity.webapp.tomcat.Tomcat8Server; import brooklyn.location.Location; import brooklyn.policy.Enricher; import brooklyn.policy.autoscaling.AutoScalerPolicy; @@ -151,7 +151,7 @@ public class RebindWebClusterDatabaseExampleAppIntegrationTest extends RebindTes // expect web-app to be reachable, and wired up to database HttpTestUtils.assertHttpStatusCodeEventuallyEquals(clusterUrl, 200); for (Entity appserver : appservers) { - String appserverUrl = checkNotNull(appserver.getAttribute(JBoss7Server.ROOT_URL), "appserver url of "+appserver); + String appserverUrl = checkNotNull(appserver.getAttribute(Tomcat8Server.ROOT_URL), "appserver url of "+appserver); HttpTestUtils.assertHttpStatusCodeEventuallyEquals(appserverUrl, 200); assertEquals(expectedJdbcUrl, appserver.getConfig(JavaEntityMethods.javaSysProp("brooklyn.example.db.url")), "of "+appserver); @@ -169,7 +169,7 @@ public class RebindWebClusterDatabaseExampleAppIntegrationTest extends RebindTes for (final Entity appserver : webMembersAfterGrow) { Asserts.succeedsEventually(MutableMap.of("timeout", Duration.TWO_MINUTES), new Runnable() { @Override public void run() { - String appserverUrl = checkNotNull(appserver.getAttribute(JBoss7Server.ROOT_URL), "appserver url of "+appserver); + String appserverUrl = checkNotNull(appserver.getAttribute(Tomcat8Server.ROOT_URL), "appserver url of "+appserver); HttpTestUtils.assertHttpStatusCodeEquals(appserverUrl, 200); assertEquals(expectedJdbcUrl, appserver.getConfig(JavaEntityMethods.javaSysProp("brooklyn.example.db.url")), "of "+appserver); Asserts.assertEqualsIgnoringOrder(nginx.getAttribute(NginxController.SERVER_POOL_TARGETS).keySet(), webMembersAfterGrow); @@ -179,7 +179,7 @@ public class RebindWebClusterDatabaseExampleAppIntegrationTest extends RebindTes // expect enrichers to be there Iterables.find(web.getEnrichers(), Predicates.instanceOf(HttpLatencyDetector.class)); Iterable<Enricher> propagatorEnrichers = Iterables.filter(web.getEnrichers(), Predicates.instanceOf(Propagator.class)); - assertEquals(Iterables.size(propagatorEnrichers), 2, "propagatorEnrichers="+propagatorEnrichers); + assertEquals(Iterables.size(propagatorEnrichers), 3, "propagatorEnrichers="+propagatorEnrichers); // Check we see evidence of the enrichers having an effect. // Relying on WebAppMonitor to stimulate activity. http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8babf3d3/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxRebindIntegrationTest.java ---------------------------------------------------------------------- diff --git a/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxRebindIntegrationTest.java b/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxRebindIntegrationTest.java index 11ae4f2..98461f6 100644 --- a/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxRebindIntegrationTest.java +++ b/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxRebindIntegrationTest.java @@ -23,7 +23,6 @@ import static brooklyn.test.HttpTestUtils.assertHttpStatusCodeEquals; import static brooklyn.test.HttpTestUtils.assertHttpStatusCodeEventuallyEquals; import static org.testng.Assert.assertEquals; -import java.net.URL; import java.util.List; import java.util.Map; import java.util.concurrent.CopyOnWriteArrayList; @@ -31,6 +30,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import brooklyn.test.TestResourceUnavailableException; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.annotations.AfterMethod; @@ -47,7 +47,7 @@ import brooklyn.entity.group.DynamicCluster; import brooklyn.entity.proxying.EntitySpec; import brooklyn.entity.rebind.RebindOptions; import brooklyn.entity.rebind.RebindTestFixtureWithApp; -import brooklyn.entity.webapp.jboss.JBoss7Server; +import brooklyn.entity.webapp.tomcat.Tomcat8Server; import brooklyn.location.LocationSpec; import brooklyn.location.basic.LocalhostMachineProvisioningLocation; import brooklyn.management.ManagementContext; @@ -119,7 +119,7 @@ public class NginxRebindIntegrationTest extends RebindTestFixtureWithApp { // Set up nginx with a server pool DynamicCluster origServerPool = origApp.createAndManageChild(EntitySpec.create(DynamicCluster.class) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class)) + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class)) .configure("initialSize", 0)); NginxController origNginx = origApp.createAndManageChild(EntitySpec.create(NginxController.class) @@ -161,7 +161,7 @@ public class NginxRebindIntegrationTest extends RebindTestFixtureWithApp { // Set up nginx with a server pool DynamicCluster origServerPool = origApp.createAndManageChild(EntitySpec.create(DynamicCluster.class) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("war", getTestWar())) + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("war", getTestWar())) .configure("initialSize", 1)); NginxController origNginx = origApp.createAndManageChild(EntitySpec.create(NginxController.class) @@ -172,8 +172,8 @@ public class NginxRebindIntegrationTest extends RebindTestFixtureWithApp { origApp.start(ImmutableList.of(localhostProvisioningLocation)); String rootUrl = origNginx.getAttribute(NginxController.ROOT_URL); - JBoss7Server origJboss = (JBoss7Server) Iterables.getOnlyElement(origServerPool.getMembers()); - assertEquals(origNginx.getAttribute(NginxController.SERVER_POOL_TARGETS).keySet(), ImmutableSet.of(origJboss)); + Tomcat8Server origServer = (Tomcat8Server) Iterables.getOnlyElement(origServerPool.getMembers()); + assertEquals(origNginx.getAttribute(NginxController.SERVER_POOL_TARGETS).keySet(), ImmutableSet.of(origServer)); assertHttpStatusCodeEventuallyEquals(rootUrl, 200); WebAppMonitor monitor = newWebAppMonitor(rootUrl, 200); @@ -184,13 +184,13 @@ public class NginxRebindIntegrationTest extends RebindTestFixtureWithApp { ManagementContext newManagementContext = newApp.getManagementContext(); final NginxController newNginx = (NginxController) Iterables.find(newApp.getChildren(), Predicates.instanceOf(NginxController.class)); final DynamicCluster newServerPool = (DynamicCluster) newManagementContext.getEntityManager().getEntity(origServerPool.getId()); - final JBoss7Server newJboss = (JBoss7Server) Iterables.getOnlyElement(newServerPool.getMembers()); + final Tomcat8Server newServer = (Tomcat8Server) Iterables.getOnlyElement(newServerPool.getMembers()); // Expect continually to have same nginx members; should not lose them temporarily! Asserts.succeedsContinually(new Runnable() { public void run() { Map<Entity, String> newNginxMemebers = newNginx.getAttribute(NginxController.SERVER_POOL_TARGETS); - assertEquals(newNginxMemebers.keySet(), ImmutableSet.of(newJboss)); + assertEquals(newNginxMemebers.keySet(), ImmutableSet.of(newServer)); }}); @@ -213,7 +213,7 @@ public class NginxRebindIntegrationTest extends RebindTestFixtureWithApp { Thread.sleep(10*1000); - newJboss.stop(); + newServer.stop(); assertHttpStatusCodeEventuallyEquals(rootUrl, 200); @@ -234,7 +234,7 @@ public class NginxRebindIntegrationTest extends RebindTestFixtureWithApp { .configure("childrenAsMembers", true)); DynamicCluster origServerPool = origApp.createAndManageChild(EntitySpec.create(DynamicCluster.class) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("war", getTestWar())) + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("war", getTestWar())) .configure("initialSize", 1)); UrlMapping origMapping = origApp.getManagementContext().getEntityManager().createEntity(EntitySpec.create(UrlMapping.class) @@ -262,7 +262,7 @@ public class NginxRebindIntegrationTest extends RebindTestFixtureWithApp { ManagementContext newManagementContext = newApp.getManagementContext(); final NginxController newNginx = (NginxController) Iterables.find(newApp.getChildren(), Predicates.instanceOf(NginxController.class)); DynamicCluster newServerPool = (DynamicCluster) newManagementContext.getEntityManager().getEntity(origServerPool.getId()); - JBoss7Server newJboss = (JBoss7Server) Iterables.getOnlyElement(newServerPool.getMembers()); + Tomcat8Server newServer = (Tomcat8Server) Iterables.getOnlyElement(newServerPool.getMembers()); assertAttributeEqualsEventually(newNginx, SoftwareProcess.SERVICE_UP, true); assertHttpStatusCodeEventuallyEquals(mappingGroupUrl, 200); @@ -283,7 +283,7 @@ public class NginxRebindIntegrationTest extends RebindTestFixtureWithApp { Thread.sleep(10*1000); - newJboss.stop(); + newServer.stop(); assertHttpStatusCodeEquals(mappingGroupUrl, 200); http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8babf3d3/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxUrlMappingIntegrationTest.java ---------------------------------------------------------------------- diff --git a/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxUrlMappingIntegrationTest.java b/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxUrlMappingIntegrationTest.java index d1f2fcb..2b0d6a5 100644 --- a/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxUrlMappingIntegrationTest.java +++ b/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxUrlMappingIntegrationTest.java @@ -31,6 +31,7 @@ import java.util.Map; import java.util.Set; import brooklyn.test.TestResourceUnavailableException; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.annotations.BeforeMethod; @@ -48,6 +49,8 @@ import brooklyn.entity.proxying.EntitySpec; import brooklyn.entity.webapp.JavaWebAppService; import brooklyn.entity.webapp.WebAppService; import brooklyn.entity.webapp.jboss.JBoss7Server; +import brooklyn.entity.webapp.tomcat.Tomcat8Server; +import brooklyn.entity.webapp.tomcat.Tomcat8ServerImpl; import brooklyn.location.basic.LocalhostMachineProvisioningLocation; import brooklyn.management.EntityManager; import brooklyn.test.Asserts; @@ -121,7 +124,7 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { //cluster 0 mounted at localhost1 / DynamicCluster c0 = app.createAndManageChild(EntitySpec.create(DynamicCluster.class) .configure("initialSize", 1) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("httpPort", "8100+")) + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("httpPort", "8100+")) .configure(JavaWebAppService.ROOT_WAR, getTestWar())); UrlMapping u0 = entityManager.createEntity(EntitySpec.create(UrlMapping.class) .configure("domain", "localhost1") @@ -132,7 +135,7 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { //cluster 1 at localhost2 /hello-world/ DynamicCluster c1 = app.createAndManageChild(EntitySpec.create(DynamicCluster.class) .configure("initialSize", 1) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("httpPort", "8100+")) + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("httpPort", "8100+")) .configure(JavaWebAppService.NAMED_WARS, ImmutableList.of(getTestWar()))); UrlMapping u1 = entityManager.createEntity(EntitySpec.create(UrlMapping.class) .configure("domain", "localhost2") @@ -144,7 +147,7 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { // cluster 2 at localhost3 /c2/ and mapping /hello/xxx to /hello/new xxx DynamicCluster c2 = app.createAndManageChild(EntitySpec.create(DynamicCluster.class) .configure("initialSize", 1) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("httpPort", "8100+"))); + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("httpPort", "8100+"))); UrlMapping u2 = entityManager.createEntity(EntitySpec.create(UrlMapping.class) .configure("domain", "localhost3") .configure("path", "/c2($|/.*)") @@ -157,7 +160,7 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { app.start(ImmutableList.of(localLoc)); final int port = nginx.getAttribute(NginxController.PROXY_HTTP_PORT); for (Entity member : c2.getMembers()) { - ((JBoss7Server)member).deploy(getTestWar(), "c2.war"); + ((Tomcat8Server)member).deploy(getTestWar(), "c2.war"); } Entities.dumpInfo(app); @@ -205,7 +208,7 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { public void testUrlMappingRoutesRequestByPathToCorrectGroup() throws Exception { DynamicCluster c0 = app.createAndManageChild(EntitySpec.create(DynamicCluster.class) .configure("initialSize", 1) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("httpPort", "8100+"))); + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("httpPort", "8100+"))); UrlMapping u0 = entityManager.createEntity(EntitySpec.create(UrlMapping.class) .configure("domain", "localhost") .configure("path", "/atC0($|/.*)") @@ -215,7 +218,7 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { DynamicCluster c1 = app.createAndManageChild(EntitySpec.create(DynamicCluster.class) .configure("initialSize", 1) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("httpPort", "8100+"))); + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("httpPort", "8100+"))); UrlMapping u1 = entityManager.createEntity(EntitySpec.create(UrlMapping.class) .configure("domain", "localhost") .configure("path", "/atC1($|/.*)") @@ -233,10 +236,10 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { final int port = nginx.getAttribute(NginxController.PROXY_HTTP_PORT); for (Entity child : c0.getMembers()) { - ((JBoss7Server)child).deploy(getTestWar(), "atC0.war"); + ((Tomcat8Server)child).deploy(getTestWar(), "atC0.war"); } for (Entity child : c1.getMembers()) { - ((JBoss7Server)child).deploy(getTestWar(), "atC1.war"); + ((Tomcat8Server)child).deploy(getTestWar(), "atC1.war"); } // Confirm routes requests to the correct cluster @@ -258,7 +261,7 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { public void testUrlMappingRemovedWhenMappingEntityRemoved() throws Exception { DynamicCluster c0 = app.createAndManageChild(EntitySpec.create(DynamicCluster.class) .configure("initialSize", 1) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("httpPort", "8100+")) + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("httpPort", "8100+")) .configure(JavaWebAppService.ROOT_WAR, getTestWar())); UrlMapping u0 = entityManager.createEntity(EntitySpec.create(UrlMapping.class) .configure("domain", "localhost2") @@ -292,12 +295,12 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { DynamicCluster coreCluster = app.createAndManageChild(EntitySpec.create(DynamicCluster.class) .configure("initialSize", 1) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("httpPort", "8100+")) + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("httpPort", "8100+")) .configure(JavaWebAppService.ROOT_WAR, getTestWar())); DynamicCluster c1 = app.createAndManageChild(EntitySpec.create(DynamicCluster.class) .configure("initialSize", 1) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("httpPort", "8100+")) + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("httpPort", "8100+")) .configure(JavaWebAppService.NAMED_WARS, ImmutableList.of(getTestWar()))); UrlMapping u1 = entityManager.createEntity(EntitySpec.create(UrlMapping.class) .configure("domain", "localhost1") @@ -334,7 +337,7 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { //cluster 0 mounted at localhost1 / DynamicCluster c0 = app.createAndManageChild(EntitySpec.create(DynamicCluster.class) .configure("initialSize", 1) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("httpPort", "8100+")) + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("httpPort", "8100+")) .configure(JavaWebAppService.ROOT_WAR, getTestWar())); UrlMapping u0 = entityManager.createEntity(EntitySpec.create(UrlMapping.class) .configure("domain", "localhost1") @@ -387,7 +390,7 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { final DynamicCluster c1 = app.createAndManageChild(EntitySpec.create(DynamicCluster.class) .configure("initialSize", 1) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("httpPort", "8100+")) + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("httpPort", "8100+")) .configure(JavaWebAppService.ROOT_WAR, getTestWar())); final UrlMapping u1 = entityManager.createEntity(EntitySpec.create(UrlMapping.class) .configure("domain", "localhost1") @@ -452,7 +455,7 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { DynamicCluster c0 = app.createAndManageChild(EntitySpec.create(DynamicCluster.class) .configure("initialSize", 1) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("httpPort", "8100+"))); + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("httpPort", "8100+"))); UrlMapping u0 = entityManager.createEntity(EntitySpec.create(UrlMapping.class) .configure("domain", "localhost") .configure("path", "/atC0($|/.*)") @@ -471,7 +474,7 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { final int port = nginx.getAttribute(NginxController.PROXY_HTTP_PORT); for (Entity child : c0.getMembers()) { - ((JBoss7Server)child).deploy(getTestWar(), "atC0.war"); + ((Tomcat8Server)child).deploy(getTestWar(), "atC0.war"); } // Confirm routes requests to the correct cluster @@ -493,7 +496,7 @@ public class NginxUrlMappingIntegrationTest extends BrooklynAppLiveTestSupport { //cluster 0 mounted at localhost1 / DynamicCluster c0 = app.createAndManageChild(EntitySpec.create(DynamicCluster.class) .configure("initialSize", 1) - .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class).configure("httpPort", "8100+")) + .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(Tomcat8Server.class).configure("httpPort", "8100+")) .configure(JavaWebAppService.ROOT_WAR, getTestWar())); UrlMapping u0 = entityManager.createEntity(EntitySpec.create(UrlMapping.class) .configure("domain", "localhost1") http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8babf3d3/usage/launcher/src/test/java/brooklyn/entity/brooklynnode/BrooklynEntityMirrorIntegrationTest.java ---------------------------------------------------------------------- diff --git a/usage/launcher/src/test/java/brooklyn/entity/brooklynnode/BrooklynEntityMirrorIntegrationTest.java b/usage/launcher/src/test/java/brooklyn/entity/brooklynnode/BrooklynEntityMirrorIntegrationTest.java index bb50f5a..a523019 100644 --- a/usage/launcher/src/test/java/brooklyn/entity/brooklynnode/BrooklynEntityMirrorIntegrationTest.java +++ b/usage/launcher/src/test/java/brooklyn/entity/brooklynnode/BrooklynEntityMirrorIntegrationTest.java @@ -35,6 +35,7 @@ import brooklyn.entity.basic.EntityInternal; import brooklyn.entity.proxying.EntitySpec; import brooklyn.launcher.BrooklynWebServer; import brooklyn.management.ManagementContext; +import brooklyn.management.ha.HighAvailabilityMode; import brooklyn.rest.filter.BrooklynPropertiesSecurityFilter; import brooklyn.test.Asserts; import brooklyn.test.EntityTestUtils; @@ -91,7 +92,10 @@ public class BrooklynEntityMirrorIntegrationTest { if (useSecurityFilter) server.setSecurityFilter(BrooklynPropertiesSecurityFilter.class); server.start(); + serverMgmt.getHighAvailabilityManager().disabled(); serverApp = ApplicationBuilder.newManagedApp(TestApplication.class, serverMgmt); + + ((LocalManagementContextForTests)serverMgmt).noteStartupComplete(); } catch (Exception e) { throw Exceptions.propagate(e); } http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/8babf3d3/usage/launcher/src/test/resources/vanilla-software-with-child-blueprint.yaml ---------------------------------------------------------------------- diff --git a/usage/launcher/src/test/resources/vanilla-software-with-child-blueprint.yaml b/usage/launcher/src/test/resources/vanilla-software-with-child-blueprint.yaml index fcd5cc3..877cef0 100644 --- a/usage/launcher/src/test/resources/vanilla-software-with-child-blueprint.yaml +++ b/usage/launcher/src/test/resources/vanilla-software-with-child-blueprint.yaml @@ -22,13 +22,23 @@ name: vanilla-date-test location: localhost services: -- type: vanilla +- type: brooklyn.entity.basic.VanillaSoftwareProcess name: Date1 brooklyn.config: - launch.command: "echo utc `date +%s` > DATE ; echo human `date` >> DATE ; { nohup sleep 60 & } ; echo $! > $PID_FILE ; sleep 3" + launch.command: | + echo utc `date +%s` > DATE + echo human `date` >> DATE + { nohup sleep 60 & } + echo $! > $PID_FILE + sleep 3 children.startable.mode: foreground_late brooklyn.children: - - type: vanilla + - type: brooklyn.entity.basic.VanillaSoftwareProcess name: Date2 brooklyn.config: - launch.command: "echo utc `date +%s` > DATE ; echo human `date` >> DATE ; { nohup sleep 60 & } ; echo $! > $PID_FILE ; sleep 3" + launch.command: | + echo utc `date +%s` > DATE + echo human `date` >> DATE + { nohup sleep 60 & } + echo $! > $PID_FILE + sleep 3
