camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1374950 - in /camel/branches/camel-2.10.x: ./ tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/properties/PropertiesRouteTest.java tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jasypt/JasyptTest.java
Date Mon, 20 Aug 2012 09:05:15 GMT
Author: davsclaus
Date: Mon Aug 20 09:05:14 2012
New Revision: 1374950

URL: http://svn.apache.org/viewvc?rev=1374950&view=rev
Log:
CAMEL-5508: Improved Camel Test, to ensure properties component is always pre setup which
its logic would already do if certain features is enabled. This ensures that when using advice
with always works regardless when the camel context is being started (before or after advice).

Modified:
    camel/branches/camel-2.10.x/   (props changed)
    camel/branches/camel-2.10.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/properties/PropertiesRouteTest.java
    camel/branches/camel-2.10.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jasypt/JasyptTest.java

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1374949

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.10.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/properties/PropertiesRouteTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/properties/PropertiesRouteTest.java?rev=1374950&r1=1374949&r2=1374950&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/properties/PropertiesRouteTest.java
(original)
+++ camel/branches/camel-2.10.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/core/properties/PropertiesRouteTest.java
Mon Aug 20 09:05:14 2012
@@ -37,13 +37,10 @@ public class PropertiesRouteTest extends
     }
 
     protected RouteBuilder createRouteBuilder() {
-        // create the properties component
-        PropertiesComponent pc = new PropertiesComponent();
+        // configure the properties component
+        PropertiesComponent pc = context.getComponent("properties", PropertiesComponent.class);
         pc.setLocation("classpath:org/apache/camel/itest/osgi/core/properties/myproperties.properties");
 
-        // add properties component to camel context
-        context.addComponent("properties", pc);
-
         return new RouteBuilder() {
             public void configure() {
                 from("direct:start").to("{{cool}}");

Modified: camel/branches/camel-2.10.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jasypt/JasyptTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jasypt/JasyptTest.java?rev=1374950&r1=1374949&r2=1374950&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jasypt/JasyptTest.java
(original)
+++ camel/branches/camel-2.10.x/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jasypt/JasyptTest.java
Mon Aug 20 09:05:14 2012
@@ -46,15 +46,12 @@ public class JasyptTest extends OSGiInte
         // and set the master password
         jasypt.setPassword("secret");
 
-        // create the properties component
-        PropertiesComponent pc = new PropertiesComponent();
+        // configure the properties component
+        PropertiesComponent pc = context.getComponent("properties", PropertiesComponent.class);
         pc.setLocation("classpath:org/apache/camel/itest/osgi/jasypt/myproperties.properties");
         // and use the jasypt properties parser so we can decrypt values
         pc.setPropertiesParser(jasypt);
 
-        // add properties component to camel context
-        context.addComponent("properties", pc);
-
         return new RouteBuilder() {
             public void configure() {
                 from("direct:start").to("{{cool.result}}");



Mime
View raw message