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/11/12 11:35:39 UTC
[1/4] git commit: CAMEL-6679: Added unit test
Updated Branches:
refs/heads/camel-2.11.x 96c1ca4ea -> d2fbde7a9
refs/heads/camel-2.12.x 12fc496fb -> f884a26b0
refs/heads/master 2414eb613 -> 7c35dd872
CAMEL-6679: Added unit test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/43704eb7
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/43704eb7
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/43704eb7
Branch: refs/heads/master
Commit: 43704eb715ff72b4341527d455738ca1da991e22
Parents: 2414eb6
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Nov 12 11:26:47 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Nov 12 11:26:58 2013 +0100
----------------------------------------------------------------------
.../zipfile/ZipSplitterRouteIssueTest.java | 56 +++++++++++++++++++
.../zipfile/ZipSplitterRouteTest.java | 11 ++--
.../camel-zipfile/src/test/resources/data.zip | Bin 0 -> 540 bytes
.../src/test/resources/log4j.properties | 40 ++++++-------
4 files changed, 83 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/43704eb7/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipSplitterRouteIssueTest.java
----------------------------------------------------------------------
diff --git a/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipSplitterRouteIssueTest.java b/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipSplitterRouteIssueTest.java
new file mode 100644
index 0000000..8e69e57
--- /dev/null
+++ b/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipSplitterRouteIssueTest.java
@@ -0,0 +1,56 @@
+/**
+ * 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.dataformat.zipfile;
+
+import java.io.File;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class ZipSplitterRouteIssueTest extends CamelTestSupport {
+
+ @Override
+ public void setUp() throws Exception {
+ deleteDirectory("target/zip");
+ super.setUp();
+ }
+
+ @Test
+ public void testSplitter() throws Exception {
+ getMockEndpoint("mock:entry").expectedMessageCount(2);
+
+ template.sendBody("seda:decompressFiles", new File("src/test/resources/data.zip"));
+
+ assertMockEndpointsSatisfied();
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from("seda:decompressFiles")
+ .split(new ZipSplitter()).streaming().shareUnitOfWork()
+ .log("we are splitting")
+ .to("mock:entry")
+ .to("file:target/zip/?fileName=decompressed.txt&fileExist=Append");
+ }
+ };
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/43704eb7/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipSplitterRouteTest.java
----------------------------------------------------------------------
diff --git a/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipSplitterRouteTest.java b/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipSplitterRouteTest.java
index 27de3ba..d94e0c7 100644
--- a/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipSplitterRouteTest.java
+++ b/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipSplitterRouteTest.java
@@ -16,14 +16,12 @@
*/
package org.apache.camel.dataformat.zipfile;
-
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Test;
public class ZipSplitterRouteTest extends CamelTestSupport {
-
@Test
public void testSplitter() throws InterruptedException {
@@ -39,9 +37,12 @@ public class ZipSplitterRouteTest extends CamelTestSupport {
public void configure() throws Exception {
// Unzip file and Split it according to FileEntry
from("file:src/test/resources/org/apache/camel/dataformat/zipfile?consumer.delay=1000&noop=true")
- .log("Start processing big file: ${header.CamelFileName}").split(new ZipSplitter())
- .streaming().convertBodyTo(String.class).to("mock:processZipEntry")
- .end().log("Done processing big file: ${header.CamelFileName}");
+ .log("Start processing big file: ${header.CamelFileName}")
+ .split(new ZipSplitter()).streaming()
+ .to("log:entry")
+ .convertBodyTo(String.class).to("mock:processZipEntry")
+ .end()
+ .log("Done processing big file: ${header.CamelFileName}");
}
};
http://git-wip-us.apache.org/repos/asf/camel/blob/43704eb7/components/camel-zipfile/src/test/resources/data.zip
----------------------------------------------------------------------
diff --git a/components/camel-zipfile/src/test/resources/data.zip b/components/camel-zipfile/src/test/resources/data.zip
new file mode 100644
index 0000000..fa6e598
Binary files /dev/null and b/components/camel-zipfile/src/test/resources/data.zip differ
http://git-wip-us.apache.org/repos/asf/camel/blob/43704eb7/components/camel-zipfile/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/components/camel-zipfile/src/test/resources/log4j.properties b/components/camel-zipfile/src/test/resources/log4j.properties
index 0a720b7..13093d4 100644
--- a/components/camel-zipfile/src/test/resources/log4j.properties
+++ b/components/camel-zipfile/src/test/resources/log4j.properties
@@ -1,32 +1,34 @@
-#
-# 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.
-#
+## ------------------------------------------------------------------------
+## 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.
+## ------------------------------------------------------------------------
#
-# The logging properties used
+# The logging properties used for testing.
#
log4j.rootLogger=INFO, file
+#
+# uncomment the following line to enable debugging of Camel
#log4j.logger.org.apache.camel=DEBUG
-#log4j.logger.org.apache.camel.dataformat.zipfile=DEBUG
# CONSOLE appender not used by default
log4j.appender.out=org.apache.log4j.ConsoleAppender
log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=[%t] %c{1} %-5p %m%n
+log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
+#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
# File appender
log4j.appender.file=org.apache.log4j.FileAppender
[4/4] git commit: CAMEL-6107: Upgraded to twitter4j 3.0.5
Posted by da...@apache.org.
CAMEL-6107: Upgraded to twitter4j 3.0.5
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f884a26b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f884a26b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f884a26b
Branch: refs/heads/camel-2.12.x
Commit: f884a26b0ea6a208eeb2f88c06c480cf4eb4a59d
Parents: 12fc496f
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Nov 12 11:35:35 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Nov 12 11:36:32 2013 +0100
----------------------------------------------------------------------
parent/pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/f884a26b/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index dcf9738..048e26a 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -387,8 +387,8 @@
<tagsoup-bundle-version>1.2_5</tagsoup-bundle-version>
<tagsoup-version>1.2.1</tagsoup-version>
<testng-version>6.8.7</testng-version>
- <twitter4j-bundle-version>3.0.3_1</twitter4j-bundle-version>
- <twitter4j-version>3.0.3</twitter4j-version>
+ <twitter4j-bundle-version>3.0.5_1</twitter4j-bundle-version>
+ <twitter4j-version>3.0.5</twitter4j-version>
<urlrewritefilter-version>4.0.4</urlrewritefilter-version>
<urlrewritefilter-bundle-version>4.0.4_1</urlrewritefilter-bundle-version>
<validation-api-version>1.1.0.Final</validation-api-version>
[2/4] git commit: CAMEL-6107: Upgraded to twitter4j 3.0.5
Posted by da...@apache.org.
CAMEL-6107: Upgraded to twitter4j 3.0.5
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7c35dd87
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7c35dd87
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7c35dd87
Branch: refs/heads/master
Commit: 7c35dd872f6f950dd1c75a22ec6602867f2486fc
Parents: 43704eb
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Nov 12 11:35:35 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Nov 12 11:35:35 2013 +0100
----------------------------------------------------------------------
parent/pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/7c35dd87/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 85b1a5b..330bd4d 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -390,8 +390,8 @@
<tagsoup-bundle-version>1.2_5</tagsoup-bundle-version>
<tagsoup-version>1.2.1</tagsoup-version>
<testng-version>6.8.7</testng-version>
- <twitter4j-bundle-version>3.0.3_1</twitter4j-bundle-version>
- <twitter4j-version>3.0.3</twitter4j-version>
+ <twitter4j-bundle-version>3.0.5_1</twitter4j-bundle-version>
+ <twitter4j-version>3.0.5</twitter4j-version>
<urlrewritefilter-version>4.0.4</urlrewritefilter-version>
<urlrewritefilter-bundle-version>4.0.4_1</urlrewritefilter-bundle-version>
<validation-api-version>1.1.0.Final</validation-api-version>
[3/4] git commit: CAMEL-6107: Upgraded to twitter4j 3.0.5
Posted by da...@apache.org.
CAMEL-6107: Upgraded to twitter4j 3.0.5
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d2fbde7a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d2fbde7a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d2fbde7a
Branch: refs/heads/camel-2.11.x
Commit: d2fbde7a91ed39d2cea9773949ad3aed0e601220
Parents: 96c1ca4
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Nov 12 11:35:35 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Nov 12 11:36:08 2013 +0100
----------------------------------------------------------------------
parent/pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/d2fbde7a/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 635cc2a..bc7c663 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -371,8 +371,8 @@
<tagsoup-bundle-version>1.2_5</tagsoup-bundle-version>
<tagsoup-version>1.2.1</tagsoup-version>
<testng-version>6.8.7</testng-version>
- <twitter4j-bundle-version>3.0.3_1</twitter4j-bundle-version>
- <twitter4j-version>3.0.3</twitter4j-version>
+ <twitter4j-bundle-version>3.0.5_1</twitter4j-bundle-version>
+ <twitter4j-version>3.0.5</twitter4j-version>
<urlrewritefilter-version>4.0.4</urlrewritefilter-version>
<urlrewritefilter-bundle-version>4.0.4_1</urlrewritefilter-bundle-version>
<velocity-bundle-version>1.7_6</velocity-bundle-version>