Repository: camel Updated Branches: refs/heads/master c9bd1dd10 -> 575033f24
CAMEL-11225: fix tests Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/575033f2 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/575033f2 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/575033f2 Branch: refs/heads/master Commit: 575033f24d73c1d3746dc0f6cbf5d91c09ebcddb Parents: c9bd1dd Author: lburgazzoli <lburgazz...@gmail.com> Authored: Mon May 8 15:06:53 2017 +0200 Committer: lburgazzoli <lburgazz...@gmail.com> Committed: Mon May 8 15:06:53 2017 +0200 ---------------------------------------------------------------------- .../camel/spring/CircularComponentCreationTest.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/575033f2/components/camel-spring/src/test/java/org/apache/camel/spring/CircularComponentCreationTest.java ---------------------------------------------------------------------- diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/CircularComponentCreationTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/CircularComponentCreationTest.java index 05f50ed..0a74bfe 100644 --- a/components/camel-spring/src/test/java/org/apache/camel/spring/CircularComponentCreationTest.java +++ b/components/camel-spring/src/test/java/org/apache/camel/spring/CircularComponentCreationTest.java @@ -29,7 +29,14 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; public class CircularComponentCreationTest { @Test public void testSimple() { - doTest("org/apache/camel/spring/CircularComponentCreationSimpleTest.xml"); + try { + doTest("org/apache/camel/spring/CircularComponentCreationSimpleTest.xml"); + + Assert.fail("Exception should have been thrown"); + } catch (Exception e) { + Assert.assertTrue(e instanceof RuntimeCamelException); + Assert.assertTrue(e.getCause() instanceof FailedToCreateRouteException); + } } @Test @@ -47,9 +54,6 @@ public class CircularComponentCreationTest { try { applicationContext = new ClassPathXmlApplicationContext(path); camelContext = new SpringCamelContext(applicationContext); - } catch (Exception e) { - Assert.assertTrue(e instanceof RuntimeCamelException); - Assert.assertTrue(e.getCause() instanceof FailedToCreateRouteException); } finally { IOHelper.close(applicationContext); }