You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2013/09/28 10:25:30 UTC
[1/4] git commit: Added unit test based on user forum issue
Updated Branches:
refs/heads/camel-2.12.x 97ed1bcb0 -> 08e7f8178
refs/heads/master 13a3daa6f -> 6f729ece0
Added unit test based on user forum issue
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e3d3d08a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e3d3d08a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e3d3d08a
Branch: refs/heads/master
Commit: e3d3d08ab6b7088923e642ce1d6627f01e66032a
Parents: 13a3daa
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Sep 28 08:53:59 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Sep 28 08:54:11 2013 +0200
----------------------------------------------------------------------
.../test/blueprint/ConfigAdminEndpointTest.java | 40 ++++++++++++++++
.../test/blueprint/configadmin-endpoint.xml | 48 ++++++++++++++++++++
2 files changed, 88 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/e3d3d08a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java
new file mode 100644
index 0000000..733ebd8
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java
@@ -0,0 +1,40 @@
+/**
+ * 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.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ConfigAdminEndpointTest extends CamelBlueprintTestSupport {
+
+ @Override
+ protected String getBlueprintDescriptor() {
+ return "org/apache/camel/test/blueprint/configadmin-endpoint.xml";
+ }
+
+ @Test
+ public void testConfigAdmin() throws Exception {
+ getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
+
+ template.sendBody("direct:start", "World");
+
+ assertMockEndpointsSatisfied();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/e3d3d08a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-endpoint.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-endpoint.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-endpoint.xml
new file mode 100644
index 0000000..c203639
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-endpoint.xml
@@ -0,0 +1,48 @@
+<?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.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+ xsi:schemaLocation="
+ http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
+ http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+ <!-- blueprint property placeholders -->
+ <cm:property-placeholder persistent-id="my-placeholders">
+ <cm:default-properties>
+ <cm:property name="greeting" value="Bye"/>
+ <cm:property name="destination" value="mock:result"/>
+ </cm:default-properties>
+ </cm:property-placeholder>
+
+ <camelContext id="myCamel" xmlns="http://camel.apache.org/schema/blueprint">
+
+ <!-- need to use {{ }} with blueprint -->
+ <endpoint id="foo" uri="{{destination}}"/>
+
+ <route>
+ <from uri="direct:start"/>
+ <transform>
+ <simple>{{greeting}} ${body}</simple>
+ </transform>
+ <to uri="ref:foo"/>
+ </route>
+
+ </camelContext>
+
+</blueprint>
[3/4] git commit: CAMEL-6795: default spool directory in
DefaultStreamCachingStrategy should be in a camel sub dir
Posted by da...@apache.org.
CAMEL-6795: default spool directory in DefaultStreamCachingStrategy should be in a camel sub dir
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ac1f8551
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ac1f8551
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ac1f8551
Branch: refs/heads/camel-2.12.x
Commit: ac1f85516864c99f27bc929c6a2d30100fb6b056
Parents: 97ed1bc
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Sep 28 10:24:50 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Sep 28 10:25:25 2013 +0200
----------------------------------------------------------------------
.../java/org/apache/camel/impl/DefaultStreamCachingStrategy.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/ac1f8551/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java
index dd121e4..8d407fe 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java
@@ -53,7 +53,7 @@ public class DefaultStreamCachingStrategy extends org.apache.camel.support.Servi
private CamelContext camelContext;
private boolean enabled;
private File spoolDirectory;
- private transient String spoolDirectoryName = "${java.io.tmpdir}camel-tmp-#uuid#";
+ private transient String spoolDirectoryName = "${java.io.tmpdir}/camel/camel-tmp-#uuid#";
private long spoolThreshold = StreamCache.DEFAULT_SPOOL_THRESHOLD;
private int spoolUsedHeapMemoryThreshold;
private SpoolUsedHeapMemoryLimit spoolUsedHeapMemoryLimit;
[2/4] git commit: CAMEL-6795: default spool directory in
DefaultStreamCachingStrategy should be in a camel sub dir
Posted by da...@apache.org.
CAMEL-6795: default spool directory in DefaultStreamCachingStrategy should be in a camel sub dir
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6f729ece
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6f729ece
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6f729ece
Branch: refs/heads/master
Commit: 6f729ece00378377c0e18293465e7512760ed0db
Parents: e3d3d08
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Sep 28 10:24:50 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Sep 28 10:24:50 2013 +0200
----------------------------------------------------------------------
.../java/org/apache/camel/impl/DefaultStreamCachingStrategy.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/6f729ece/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java
index dd121e4..8d407fe 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultStreamCachingStrategy.java
@@ -53,7 +53,7 @@ public class DefaultStreamCachingStrategy extends org.apache.camel.support.Servi
private CamelContext camelContext;
private boolean enabled;
private File spoolDirectory;
- private transient String spoolDirectoryName = "${java.io.tmpdir}camel-tmp-#uuid#";
+ private transient String spoolDirectoryName = "${java.io.tmpdir}/camel/camel-tmp-#uuid#";
private long spoolThreshold = StreamCache.DEFAULT_SPOOL_THRESHOLD;
private int spoolUsedHeapMemoryThreshold;
private SpoolUsedHeapMemoryLimit spoolUsedHeapMemoryLimit;
[4/4] git commit: Added unit test based on user forum issue
Posted by da...@apache.org.
Added unit test based on user forum issue
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/08e7f817
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/08e7f817
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/08e7f817
Branch: refs/heads/camel-2.12.x
Commit: 08e7f8178b510807a80df0a5ed4758c4dbc23e83
Parents: ac1f855
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Sep 28 08:53:59 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Sep 28 10:25:25 2013 +0200
----------------------------------------------------------------------
.../test/blueprint/ConfigAdminEndpointTest.java | 40 ++++++++++++++++
.../test/blueprint/configadmin-endpoint.xml | 48 ++++++++++++++++++++
2 files changed, 88 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/08e7f817/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java
new file mode 100644
index 0000000..733ebd8
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java
@@ -0,0 +1,40 @@
+/**
+ * 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.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ConfigAdminEndpointTest extends CamelBlueprintTestSupport {
+
+ @Override
+ protected String getBlueprintDescriptor() {
+ return "org/apache/camel/test/blueprint/configadmin-endpoint.xml";
+ }
+
+ @Test
+ public void testConfigAdmin() throws Exception {
+ getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
+
+ template.sendBody("direct:start", "World");
+
+ assertMockEndpointsSatisfied();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/08e7f817/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-endpoint.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-endpoint.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-endpoint.xml
new file mode 100644
index 0000000..c203639
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-endpoint.xml
@@ -0,0 +1,48 @@
+<?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.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+ xsi:schemaLocation="
+ http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
+ http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+ <!-- blueprint property placeholders -->
+ <cm:property-placeholder persistent-id="my-placeholders">
+ <cm:default-properties>
+ <cm:property name="greeting" value="Bye"/>
+ <cm:property name="destination" value="mock:result"/>
+ </cm:default-properties>
+ </cm:property-placeholder>
+
+ <camelContext id="myCamel" xmlns="http://camel.apache.org/schema/blueprint">
+
+ <!-- need to use {{ }} with blueprint -->
+ <endpoint id="foo" uri="{{destination}}"/>
+
+ <route>
+ <from uri="direct:start"/>
+ <transform>
+ <simple>{{greeting}} ${body}</simple>
+ </transform>
+ <to uri="ref:foo"/>
+ </route>
+
+ </camelContext>
+
+</blueprint>