Repository: camel
Updated Branches:
  refs/heads/master 7e1e36210 -> 0546713dd


CAMEL-11752: add (ignored) test to demostrate the issue


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0546713d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0546713d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0546713d

Branch: refs/heads/master
Commit: 0546713ddd64cf5757f49aa02eabd86c50cfb1ed
Parents: 7e1e362
Author: lburgazzoli <[email protected]>
Authored: Wed Sep 6 15:00:37 2017 +0200
Committer: lburgazzoli <[email protected]>
Committed: Wed Sep 6 15:01:10 2017 +0200

----------------------------------------------------------------------
 .../boot/MixedBootAndXmlConfigurationTest.java  | 54 ++++++++++++++++++++
 .../src/test/resources/mixed-camel-context.xml  | 30 +++++++++++
 2 files changed, 84 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0546713d/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/MixedBootAndXmlConfigurationTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/MixedBootAndXmlConfigurationTest.java
 
b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/MixedBootAndXmlConfigurationTest.java
new file mode 100644
index 0000000..17eda49
--- /dev/null
+++ 
b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/MixedBootAndXmlConfigurationTest.java
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.boot;
+
+import org.apache.camel.CamelContext;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.ImportResource;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@DirtiesContext
+@RunWith(SpringRunner.class)
+@SpringBootTest(
+    properties = {
+        "camel.springboot.name = camel-spring-boot"
+    }
+)
+public class MixedBootAndXmlConfigurationTest {
+    @Autowired
+    private CamelContext camel;
+
+    @Ignore("See https://issues.apache.org/jira/browse/CAMEL-11752";)
+    @Test
+    public void thereShouldBeTwoRoutesConfigured() {
+        Assert.assertEquals("camel-spring-boot", camel.getName());
+    }
+
+    @Configuration
+    @EnableAutoConfiguration
+    @ImportResource("classpath:mixed-camel-context.xml")
+    public static class TestConfiguration {
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/0546713d/components/camel-spring-boot/src/test/resources/mixed-camel-context.xml
----------------------------------------------------------------------
diff --git 
a/components/camel-spring-boot/src/test/resources/mixed-camel-context.xml 
b/components/camel-spring-boot/src/test/resources/mixed-camel-context.xml
new file mode 100644
index 0000000..799d2de
--- /dev/null
+++ b/components/camel-spring-boot/src/test/resources/mixed-camel-context.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://camel.apache.org/schema/spring       
http://camel.apache.org/schema/spring/camel-spring.xsd";>
+
+    <!-- Camel Route -->
+    <camelContext id="camel-spring-xml" 
xmlns="http://camel.apache.org/schema/spring";>
+    </camelContext>
+
+</beans>

Reply via email to