camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r770172 - in /camel/trunk: camel-core/src/test/java/org/apache/camel/ContextTestSupport.java components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
Date Thu, 30 Apr 2009 11:44:00 GMT
Author: ningjiang
Date: Thu Apr 30 11:43:59 2009
New Revision: 770172

URL: http://svn.apache.org/viewvc?rev=770172&view=rev
Log:
CAMEL-1575 Fixed the NEP of ContextTestSupport and CamelTestSupport

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
    camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java?rev=770172&r1=770171&r2=770172&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java Thu Apr
30 11:43:59 2009
@@ -101,7 +101,9 @@
         if (camelContextService != null) {
             camelContextService.stop();
         } else {
-            context.stop();
+            if (context != null) {
+                context.stop();
+            }    
         }
     }
 

Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java?rev=770172&r1=770171&r2=770172&view=diff
==============================================================================
--- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
(original)
+++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
Thu Apr 30 11:43:59 2009
@@ -101,7 +101,9 @@
     @Override
     protected void tearDown() throws Exception {
         log.debug("tearDown test: " + getName());
-        template.stop();
+        if (template != null) {
+            template.stop();
+        }
         stopCamelContext();
     }
     
@@ -119,7 +121,9 @@
         if (camelContextService != null) {
             camelContextService.stop();
         } else {
-            context.stop();
+            if (context != null) {
+                context.stop();
+            }
         }
     }
 



Mime
View raw message