brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [43/50] brooklyn-server git commit: Adds testInheritedConfigAvailableDeepInHierarchy
Date Mon, 01 Feb 2016 17:49:29 GMT
Adds testInheritedConfigAvailableDeepInHierarchy

- Was added while trying to track down bug @grkvlt was seeing,
  but this wasn't the cause! A useful test to have though.


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

Branch: refs/heads/0.5.0
Commit: 6ea7b07ef541cb1c2359b00d6009fc5b3beb7781
Parents: 129bd9c
Author: Aled Sage <aled.sage@gmail.com>
Authored: Wed Apr 17 14:46:03 2013 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Thu Apr 25 11:25:01 2013 +0100

----------------------------------------------------------------------
 .../entity/basic/EntityConfigMapUsageTest.java         | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/6ea7b07e/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageTest.java b/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageTest.java
index b5efd58..b2c99a2 100644
--- a/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageTest.java
+++ b/core/src/test/java/brooklyn/entity/basic/EntityConfigMapUsageTest.java
@@ -90,6 +90,19 @@ public class EntityConfigMapUsageTest {
     }
     
     @Test
+    public void testInheritedConfigAvailableDeepInHierarchy() throws Exception {
+        TestEntity parent = app.createAndManageChild(EntitySpecs.spec(TestEntity.class)
+                .configure(strKeyWithDefault, "customval"));
+        TestEntity entity = parent.createAndManageChild(EntitySpecs.spec(TestEntity.class));
+        TestEntity entity2 = entity.createAndManageChild(EntitySpecs.spec(TestEntity.class));
+        TestEntity entity3 = entity2.createAndManageChild(EntitySpecs.spec(TestEntity.class));
+        
+        assertEquals(entity.getConfig(strKeyWithDefault), "customval");
+        assertEquals(entity2.getConfig(strKeyWithDefault), "customval");
+        assertEquals(entity3.getConfig(strKeyWithDefault), "customval");
+    }
+    
+    @Test
     public void testConfigCanBeSetOnEntity() throws Exception {
         TestEntity entity = app.createChild(EntitySpecs.spec(TestEntity.class));
         ((EntityLocal)entity).setConfig(strKey, "aval");


Mime
View raw message