You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2014/11/17 08:39:15 UTC
[1/2] camel git commit: CAMEL-8052 Added some unit tests for Spring
DSL
Repository: camel
Updated Branches:
refs/heads/master 0273cd737 -> dc24362ce
CAMEL-8052 Added some unit tests for Spring DSL
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/affeb0e3
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/affeb0e3
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/affeb0e3
Branch: refs/heads/master
Commit: affeb0e3c4443665e9731998536362ddd9b0278c
Parents: 0273cd7
Author: Willem Jiang <wi...@gmail.com>
Authored: Mon Nov 17 15:38:11 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Mon Nov 17 15:38:11 2014 +0800
----------------------------------------------------------------------
...SpringRemovePropertiesWithExclusionTest.java | 28 +++++++++++++
...ingRemovePropertiesWithoutExclusionTest.java | 28 +++++++++++++
.../processor/removePropertiesWithExclusion.xml | 43 ++++++++++++++++++++
.../removePropertiesWithoutExclusion.xml | 40 ++++++++++++++++++
4 files changed, 139 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/affeb0e3/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertiesWithExclusionTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertiesWithExclusionTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertiesWithExclusionTest.java
new file mode 100644
index 0000000..f28d6f2
--- /dev/null
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertiesWithExclusionTest.java
@@ -0,0 +1,28 @@
+/**
+ * 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.processor;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.processor.RemovePropertiesWithExclusionTest;
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+public class SpringRemovePropertiesWithExclusionTest extends RemovePropertiesWithExclusionTest {
+ protected CamelContext createCamelContext() throws Exception {
+ return createSpringCamelContext(this,
+ "org/apache/camel/spring/processor/removePropertiesWithExclusion.xml");
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/affeb0e3/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertiesWithoutExclusionTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertiesWithoutExclusionTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertiesWithoutExclusionTest.java
new file mode 100644
index 0000000..e4523f7
--- /dev/null
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertiesWithoutExclusionTest.java
@@ -0,0 +1,28 @@
+/**
+ * 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.processor;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.processor.RemovePropertiesWithoutExclusionTest;
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+public class SpringRemovePropertiesWithoutExclusionTest extends RemovePropertiesWithoutExclusionTest {
+ protected CamelContext createCamelContext() throws Exception {
+ return createSpringCamelContext(this,
+ "org/apache/camel/spring/processor/removePropertiesWithoutExclusion.xml");
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/affeb0e3/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removePropertiesWithExclusion.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removePropertiesWithExclusion.xml b/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removePropertiesWithExclusion.xml
new file mode 100644
index 0000000..4eb3b54
--- /dev/null
+++ b/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removePropertiesWithExclusion.xml
@@ -0,0 +1,43 @@
+<?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
+ ">
+ <!-- START SNIPPET: example -->
+ <camelContext xmlns="http://camel.apache.org/schema/spring">
+ <route>
+ <from uri="direct:start"/>
+ <setProperty propertyName="foo">
+ <constant>bar</constant>
+ </setProperty>
+ <setProperty propertyName="fee">
+ <constant>bar1</constant>
+ </setProperty>
+ <setProperty propertyName="fiu">
+ <constant>bar2</constant>
+ </setProperty>
+ <to uri="mock:mid"/>
+ <removeProperties pattern="f*" excludePattern="fiu"/>
+ <to uri="mock:end"/>
+ </route>
+ </camelContext>
+ <!-- END SNIPPET: example -->
+</beans>
http://git-wip-us.apache.org/repos/asf/camel/blob/affeb0e3/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removePropertiesWithoutExclusion.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removePropertiesWithoutExclusion.xml b/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removePropertiesWithoutExclusion.xml
new file mode 100644
index 0000000..d80c4e8
--- /dev/null
+++ b/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removePropertiesWithoutExclusion.xml
@@ -0,0 +1,40 @@
+<?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
+ ">
+ <!-- START SNIPPET: example -->
+ <camelContext xmlns="http://camel.apache.org/schema/spring">
+ <route>
+ <from uri="direct:start"/>
+ <setProperty propertyName="foo">
+ <constant>bar</constant>
+ </setProperty>
+ <setProperty propertyName="fee">
+ <constant>bar1</constant>
+ </setProperty>
+ <to uri="mock:mid"/>
+ <removeProperties pattern="f*"/>
+ <to uri="mock:end"/>
+ </route>
+ </camelContext>
+ <!-- END SNIPPET: example -->
+</beans>
[2/2] camel git commit: Fixed the CS error of camel-metrics
Posted by ni...@apache.org.
Fixed the CS error of camel-metrics
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/dc24362c
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/dc24362c
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/dc24362c
Branch: refs/heads/master
Commit: dc24362ce436294d9e104aee66c796dc802c39a3
Parents: affeb0e
Author: Willem Jiang <wi...@gmail.com>
Authored: Mon Nov 17 15:38:41 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Mon Nov 17 15:38:41 2014 +0800
----------------------------------------------------------------------
.../java/org/apache/camel/component/metrics/CounterProducer.java | 2 --
1 file changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/dc24362c/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/CounterProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/CounterProducer.java b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/CounterProducer.java
index afb9a7b..008299c 100644
--- a/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/CounterProducer.java
+++ b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/CounterProducer.java
@@ -20,8 +20,6 @@ import com.codahale.metrics.Counter;
import com.codahale.metrics.MetricRegistry;
import org.apache.camel.Exchange;
import org.apache.camel.Message;
-import org.apache.camel.component.metrics.AbstractMetricsProducer;
-import org.apache.camel.component.metrics.MetricsEndpoint;
import static org.apache.camel.component.metrics.MetricsConstants.HEADER_COUNTER_DECREMENT;
import static org.apache.camel.component.metrics.MetricsConstants.HEADER_COUNTER_INCREMENT;