You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by tb...@apache.org on 2017/12/21 13:37:46 UTC
[1/2] brooklyn-server git commit: Adds test for
enableAvailabilityZones not re-inherited
Repository: brooklyn-server
Updated Branches:
refs/heads/master a081e8640 -> ca82123c8
Adds test for enableAvailabilityZones not re-inherited
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/7f960b1e
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/7f960b1e
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/7f960b1e
Branch: refs/heads/master
Commit: 7f960b1ee074b445948dd6e6dbc7a289d6cefefd
Parents: 4c2e621
Author: Aled Sage <al...@gmail.com>
Authored: Tue Dec 19 21:00:05 2017 +0000
Committer: Aled Sage <al...@gmail.com>
Committed: Tue Dec 19 21:00:05 2017 +0000
----------------------------------------------------------------------
...DynamicClusterWithAvailabilityZonesTest.java | 21 ++++++++++++++++++++
1 file changed, 21 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/7f960b1e/core/src/test/java/org/apache/brooklyn/entity/group/DynamicClusterWithAvailabilityZonesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/entity/group/DynamicClusterWithAvailabilityZonesTest.java b/core/src/test/java/org/apache/brooklyn/entity/group/DynamicClusterWithAvailabilityZonesTest.java
index 962cf0b..f0ea3a7 100644
--- a/core/src/test/java/org/apache/brooklyn/entity/group/DynamicClusterWithAvailabilityZonesTest.java
+++ b/core/src/test/java/org/apache/brooklyn/entity/group/DynamicClusterWithAvailabilityZonesTest.java
@@ -47,6 +47,7 @@ import org.apache.brooklyn.core.test.BrooklynAppUnitTestSupport;
import org.apache.brooklyn.core.test.entity.TestEntity;
import org.apache.brooklyn.entity.group.DynamicCluster.ZoneFailureDetector;
import org.apache.brooklyn.entity.group.zoneaware.ProportionalZoneFailureDetector;
+import org.apache.brooklyn.location.multi.MultiLocation;
import org.apache.brooklyn.test.Asserts;
import org.apache.brooklyn.util.javalang.Reflections;
import org.apache.brooklyn.util.time.Duration;
@@ -200,6 +201,26 @@ public class DynamicClusterWithAvailabilityZonesTest extends BrooklynAppUnitTest
assertZoneHistoriesEmpty(unrelatedZoneFailureDetector);
}
+ @Test
+ public void testEnableAvailabilityZonesNotReinherited() throws Exception {
+ cluster = app.addChild(EntitySpec.create(DynamicCluster.class)
+ .configure(DynamicCluster.ENABLE_AVAILABILITY_ZONES, true)
+ .configure(DynamicCluster.INITIAL_SIZE, 2)
+ .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(DynamicCluster.class)
+ .configure(DynamicCluster.INITIAL_SIZE, 1)
+ .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(TestEntity.class))));
+
+ MultiLocation<?> multiLoc = mgmt.getLocationManager().createLocation(LocationSpec.create(MultiLocation.class)
+ .configure(MultiLocation.SUB_LOCATION_SPECS, ImmutableList.of(
+ LocationSpec.create(SimulatedLocation.class).displayName("loc1"),
+ LocationSpec.create(SimulatedLocation.class).displayName("loc2"))));
+
+ cluster.start(ImmutableList.of(multiLoc));
+
+ List<String> locsUsed = getLocationNames(getLocationsOf(Entities.descendantsAndSelf(cluster, Predicates.instanceOf(TestEntity.class))));
+ Asserts.assertEqualsIgnoringOrder(locsUsed, ImmutableList.of("loc1", "loc2"));
+ }
+
protected EntitySpec<DynamicCluster> clusterSpec() {
return EntitySpec.create(DynamicCluster.class)
.configure(DynamicCluster.ENABLE_AVAILABILITY_ZONES, true)
[2/2] brooklyn-server git commit: This closes #921
Posted by tb...@apache.org.
This closes #921
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/ca82123c
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/ca82123c
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/ca82123c
Branch: refs/heads/master
Commit: ca82123c8e469459c20295d4cc4f94ab99eff3b1
Parents: a081e86 7f960b1
Author: Thomas Bouron <th...@cloudsoftcorp.com>
Authored: Thu Dec 21 13:37:37 2017 +0000
Committer: Thomas Bouron <th...@cloudsoftcorp.com>
Committed: Thu Dec 21 13:37:37 2017 +0000
----------------------------------------------------------------------
...DynamicClusterWithAvailabilityZonesTest.java | 21 ++++++++++++++++++++
1 file changed, 21 insertions(+)
----------------------------------------------------------------------