From: <ro...@us...> - 2009-02-20 16:39:40
|
Revision: 27 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=27&view=rev Author: roekens Date: 2009-02-20 16:39:33 +0000 (Fri, 20 Feb 2009) Log Message: ----------- added tearDown method to prevent tons of exceptions on activemq shutdown Modified Paths: -------------- cse-ip/trunk/sandbox/cse-ip/ica-his-lsf/src/test/java/de/campussource/cse/CamelTest.java Modified: cse-ip/trunk/sandbox/cse-ip/ica-his-lsf/src/test/java/de/campussource/cse/CamelTest.java =================================================================== --- cse-ip/trunk/sandbox/cse-ip/ica-his-lsf/src/test/java/de/campussource/cse/CamelTest.java 2009-02-20 16:34:38 UTC (rev 26) +++ cse-ip/trunk/sandbox/cse-ip/ica-his-lsf/src/test/java/de/campussource/cse/CamelTest.java 2009-02-20 16:39:33 UTC (rev 27) @@ -18,6 +18,7 @@ import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.spring.SpringCamelContext; import org.apache.log4j.Logger; +import org.junit.After; import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -42,6 +43,8 @@ protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() { + errorHandler(deadLetterChannel("mock:error") + .maximumRedeliveries(0)); from("activemq:AccountMessageHansen").to("mock:transformationResult"); } }; @@ -58,6 +61,15 @@ } } + @After + public void after(){ + try { + camelContext.stop(); + } catch (Exception e) { + logger.error("Error tearing down test case"); + } + } + @Test public void testFirstSteps() throws Exception { String input = getLsfSyncMessage(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |