camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggrzy...@apache.org
Subject [10/13] camel git commit: [CAMEL-8948] Use property-placeholder/@update-strategy="reload" in tests which require reload of BP container
Date Tue, 21 Jul 2015 09:24:08 GMT
[CAMEL-8948] Use property-placeholder/@update-strategy="reload" in tests which require reload
of BP container

(cherry picked from commit 21309c048e35c8eba0d482873e14d47974189456)


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/35d7ab61
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/35d7ab61
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/35d7ab61

Branch: refs/heads/camel-2.15.x
Commit: 35d7ab61431d83163c15acfa624848f6cf87b149
Parents: 2854885
Author: Grzegorz Grzybek <gr.grzybek@gmail.com>
Authored: Mon Jul 20 09:45:43 2015 +0200
Committer: Grzegorz Grzybek <gr.grzybek@gmail.com>
Committed: Tue Jul 21 09:45:54 2015 +0200

----------------------------------------------------------------------
 .../camel/test/blueprint/BlueprintPropertiesTest.java     |  2 ++
 .../apache/camel/test/blueprint/configadmin-loadfile.xml  |  6 +++---
 .../camel/test/blueprint/configadmin-loadfileoverride.xml | 10 +++++++---
 .../apache/camel/test/blueprint/configadmin-outside.xml   |  6 +++---
 .../org/apache/camel/test/blueprint/main-loadfile.xml     |  6 +++---
 5 files changed, 18 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/35d7ab61/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesTest.java
b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesTest.java
index 857959d..09ccc35 100644
--- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesTest.java
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesTest.java
@@ -19,6 +19,7 @@ package org.apache.camel.test.blueprint;
 import org.junit.Test;
 import org.osgi.framework.Bundle;
 import org.osgi.service.blueprint.container.BlueprintContainer;
+import org.osgi.service.blueprint.container.BlueprintEvent;
 
 /**
  *
@@ -49,6 +50,7 @@ public class BlueprintPropertiesTest extends CamelBlueprintTestSupport {
         }
 
         camelCore.start();
+        CamelBlueprintHelper.waitForBlueprintContainer(null, test.getBundleContext(), getClass().getSimpleName(),
BlueprintEvent.CREATED, null);
         getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname="
+ getClass().getSimpleName() + ")", 500);
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/35d7ab61/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfile.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfile.xml
b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfile.xml
index b0726cd..85659d8 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfile.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfile.xml
@@ -17,14 +17,14 @@
 -->
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
            xsi:schemaLocation="
-             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
+             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
              http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
 
   <!-- START SNIPPET: e1 -->
   <!-- blueprint property placeholders, that will use etc/stuff.cfg as the properties
file -->
-  <cm:property-placeholder persistent-id="stuff"/>
+  <cm:property-placeholder persistent-id="stuff" update-strategy="reload"/>
 
   <!-- a bean that uses a blueprint property placeholder -->
   <bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">

http://git-wip-us.apache.org/repos/asf/camel/blob/35d7ab61/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfileoverride.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfileoverride.xml
b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfileoverride.xml
index cd72116..c9e45d3 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfileoverride.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfileoverride.xml
@@ -18,13 +18,17 @@
 <!-- START SNIPPET: e1 -->
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
            xsi:schemaLocation="
-             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
+             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
              http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
 
   <!-- blueprint property placeholders, that will use etc/stuff.cfg as the properties
file -->
-  <cm:property-placeholder persistent-id="stuff"/>
+  <cm:property-placeholder persistent-id="stuff" update-strategy="reload">
+    <cm:default-properties>
+      <cm:property name="destination" value="to-be-replaced" />
+    </cm:default-properties>
+  </cm:property-placeholder>
 
   <!-- a bean that uses a blueprint property placeholder -->
   <bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">

http://git-wip-us.apache.org/repos/asf/camel/blob/35d7ab61/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-outside.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-outside.xml
b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-outside.xml
index d0f5920..03bd18c 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-outside.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-outside.xml
@@ -17,14 +17,14 @@
 -->
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
            xsi:schemaLocation="
-             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
+             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
              http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
 
   <!-- START SNIPPET: e1 -->
   <!-- blueprint property placeholders -->
-  <cm:property-placeholder persistent-id="my-placeholders">
+  <cm:property-placeholder persistent-id="my-placeholders" update-strategy="reload">
     <cm:default-properties>
       <cm:property name="greeting" value="Hello"/>
       <cm:property name="destination" value="mock:result"/>

http://git-wip-us.apache.org/repos/asf/camel/blob/35d7ab61/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-loadfile.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-loadfile.xml
b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-loadfile.xml
index 1e99278..1c84522 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-loadfile.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/main-loadfile.xml
@@ -17,13 +17,13 @@
 -->
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
            xsi:schemaLocation="
-             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
+             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
              http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
   
   <!-- blueprint property placeholders which we can configure from outside -->
-  <cm:property-placeholder persistent-id="stuff"/>
+  <cm:property-placeholder persistent-id="stuff" update-strategy="reload"/>
 
   <!-- a bean that uses a blueprint property placeholder -->
   <bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">


Mime
View raw message