brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [2/3] brooklyn-server git commit: Add test
Date Mon, 06 Nov 2017 11:24:22 GMT
Add test


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/2d14f640
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/2d14f640
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/2d14f640

Branch: refs/heads/master
Commit: 2d14f6406ad6fe60ff29ed50b527095426077df1
Parents: 09b9cda
Author: Duncan Godwin <duncan.godwin@cloudsoftcorp.com>
Authored: Fri Nov 3 14:01:38 2017 +0000
Committer: Duncan Godwin <duncan.godwin@cloudsoftcorp.com>
Committed: Fri Nov 3 14:03:10 2017 +0000

----------------------------------------------------------------------
 .../entity/group/DynamicClusterTest.java        | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/2d14f640/core/src/test/java/org/apache/brooklyn/entity/group/DynamicClusterTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/entity/group/DynamicClusterTest.java b/core/src/test/java/org/apache/brooklyn/entity/group/DynamicClusterTest.java
index 0827664..03a4a64 100644
--- a/core/src/test/java/org/apache/brooklyn/entity/group/DynamicClusterTest.java
+++ b/core/src/test/java/org/apache/brooklyn/entity/group/DynamicClusterTest.java
@@ -171,6 +171,26 @@ public class DynamicClusterTest extends AbstractDynamicClusterOrFabricTest
{
     }
 
     @Test
+    public void testMemberSpecNotInherited() throws Exception {
+        DynamicCluster cluster = app.createAndManageChild(EntitySpec.create(DynamicCluster.class)
+                .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(TestEntity.class)));
+        DynamicCluster child = cluster.addChild(EntitySpec.create(DynamicCluster.class));
+        Asserts.assertNull(child.getConfig(DynamicCluster.MEMBER_SPEC));
+        DynamicCluster memberChild = cluster.addMemberChild(EntitySpec.create(DynamicCluster.class));
+        Asserts.assertNull(memberChild.getConfig(DynamicCluster.MEMBER_SPEC));
+    }
+
+    @Test
+    public void testFirstMemberSpecNotInherited() throws Exception {
+        DynamicCluster cluster = app.createAndManageChild(EntitySpec.create(DynamicCluster.class)
+                .configure(DynamicCluster.FIRST_MEMBER_SPEC, EntitySpec.create(TestEntity.class)));
+        DynamicCluster child = cluster.addChild(EntitySpec.create(DynamicCluster.class));
+        Asserts.assertNull(child.getConfig(DynamicCluster.FIRST_MEMBER_SPEC));
+        DynamicCluster memberChild = cluster.addMemberChild(EntitySpec.create(DynamicCluster.class));
+        Asserts.assertNull(memberChild.getConfig(DynamicCluster.FIRST_MEMBER_SPEC));
+    }
+
+    @Test
     public void testClusterHasOneLocationAfterStarting() throws Exception {
         DynamicCluster cluster = app.createAndManageChild(EntitySpec.create(DynamicCluster.class)
                 .configure(DynamicCluster.MEMBER_SPEC, EntitySpec.create(TestEntity.class)));


Mime
View raw message