brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drigod...@apache.org
Subject [2/5] brooklyn-server git commit: add test which fails replicating the problem
Date Mon, 21 Aug 2017 18:32:58 GMT
add test which fails replicating the problem


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

Branch: refs/heads/master
Commit: d87bddc215d95046ba4b532578481bada359e1f9
Parents: d961de3
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Wed Aug 16 08:40:10 2017 +0100
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Wed Aug 16 09:12:09 2017 +0100

----------------------------------------------------------------------
 .../camp/brooklyn/catalog/CatalogYamlAppOsgiTest.java  |  7 +++++++
 .../camp/brooklyn/catalog/CatalogYamlAppTest.java      |  7 ++++++-
 .../camp/brooklyn/catalog/template-and-app.bom         | 13 +++++++++++++
 3 files changed, 26 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/d87bddc2/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/catalog/CatalogYamlAppOsgiTest.java
----------------------------------------------------------------------
diff --git a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/catalog/CatalogYamlAppOsgiTest.java
b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/catalog/CatalogYamlAppOsgiTest.java
index 90133c7..a7f3d95 100644
--- a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/catalog/CatalogYamlAppOsgiTest.java
+++ b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/catalog/CatalogYamlAppOsgiTest.java
@@ -28,4 +28,11 @@ public class CatalogYamlAppOsgiTest extends CatalogYamlAppTest {
     protected boolean disableOsgi() {
         return false;
     }
+
+    @Override @Test // here so we can easily test from IDE
+    // currently works in parent but fails here because we don't treat unresolved (template
with forward ref) 
+    // as an acceptable type that can be referenced in a blueprint
+    public void testAddTemplateForwardReferenceToEntity() throws Exception {
+        super.testAddTemplateForwardReferenceToEntity();
+    }
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/d87bddc2/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/catalog/CatalogYamlAppTest.java
----------------------------------------------------------------------
diff --git a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/catalog/CatalogYamlAppTest.java
b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/catalog/CatalogYamlAppTest.java
index e4a9bf9..29bde8b 100644
--- a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/catalog/CatalogYamlAppTest.java
+++ b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/catalog/CatalogYamlAppTest.java
@@ -103,5 +103,10 @@ public class CatalogYamlAppTest extends AbstractYamlTest {
             deleteCatalogEntity("org.apache.brooklyn.entity.stock.BasicApplication");
         }
     }
-    
+
+    @Test
+    public void testAddTemplateForwardReferenceToEntity() throws Exception {
+        addCatalogItems(loadYaml("template-and-app.bom"));
+        createAndStartApplication("services: [ { type: my_app_template } ]");
+    }
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/d87bddc2/camp/camp-brooklyn/src/test/resources/org/apache/brooklyn/camp/brooklyn/catalog/template-and-app.bom
----------------------------------------------------------------------
diff --git a/camp/camp-brooklyn/src/test/resources/org/apache/brooklyn/camp/brooklyn/catalog/template-and-app.bom
b/camp/camp-brooklyn/src/test/resources/org/apache/brooklyn/camp/brooklyn/catalog/template-and-app.bom
new file mode 100644
index 0000000..695e3a9
--- /dev/null
+++ b/camp/camp-brooklyn/src/test/resources/org/apache/brooklyn/camp/brooklyn/catalog/template-and-app.bom
@@ -0,0 +1,13 @@
+brooklyn.catalog:
+  id: template-and-app
+  version: 0.0.1-SNAPSHOT
+  items:
+  - id: my_app_template
+    itemType: template
+    item:
+      services:
+      - type: my_entity
+  - id: my_entity
+    itemType: entity
+    item:
+      type: org.apache.brooklyn.entity.stock.BasicApplication


Mime
View raw message