activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r533645 - /activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/RoutingUsingCamelContextFactoryTest.java
Date Mon, 30 Apr 2007 09:27:13 GMT
Author: jstrachan
Date: Mon Apr 30 02:27:12 2007
New Revision: 533645

URL: http://svn.apache.org/viewvc?view=rev&rev=533645
Log:
added explicit tear down

Modified:
    activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/RoutingUsingCamelContextFactoryTest.java

Modified: activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/RoutingUsingCamelContextFactoryTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/RoutingUsingCamelContextFactoryTest.java?view=diff&rev=533645&r1=533644&r2=533645
==============================================================================
--- activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/RoutingUsingCamelContextFactoryTest.java
(original)
+++ activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/RoutingUsingCamelContextFactoryTest.java
Mon Apr 30 02:27:12 2007
@@ -28,15 +28,17 @@
 import org.apache.commons.logging.LogFactory;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.context.support.AbstractXmlApplicationContext;
 
 /**
  * @version $Revision: 521586 $
  */
 public class RoutingUsingCamelContextFactoryTest extends TestSupport {
     protected String body = "<hello>world!</hello>";
+    protected AbstractXmlApplicationContext applicationContext;
 
     public void testXMLRouteLoading() throws Exception {
-        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/spring/routingUsingCamelContextFactoryTest.xml");
+        applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/spring/routingUsingCamelContextFactoryTest.xml");
 
         CamelContext context = (CamelContext) applicationContext.getBean("camel");
         assertNotNull("No context found!", context);
@@ -58,4 +60,9 @@
         resultEndpoint.assertIsSatisfied();
     }
 
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        applicationContext.destroy();
+    }
 }



Mime
View raw message