camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject camel git commit: Fixed the CS error of camel-hdfs and camel-hdfs2
Date Fri, 06 Mar 2015 08:30:52 GMT
Repository: camel
Updated Branches:
  refs/heads/master 5831060cd -> e9d0cf4dc


Fixed the CS error of camel-hdfs and camel-hdfs2


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

Branch: refs/heads/master
Commit: e9d0cf4dc830a5bb94bbd670dd50d8f071d90ab4
Parents: 5831060
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Fri Mar 6 16:30:15 2015 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Fri Mar 6 16:30:38 2015 +0800

----------------------------------------------------------------------
 .../camel/component/hdfs/HdfsConsumerTest.java       |  3 +--
 .../camel/component/hdfs2/HdfsConsumerTest.java      |  3 +--
 .../component/hdfs2/integration/HdfsAppendTest.java  |  2 +-
 .../HdfsProducerConsumerIntegrationTest.java         | 15 ++++-----------
 4 files changed, 7 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e9d0cf4d/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsConsumerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsConsumerTest.java
b/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsConsumerTest.java
index 25d1073..9488afb 100644
--- a/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsConsumerTest.java
+++ b/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsConsumerTest.java
@@ -59,6 +59,7 @@ import static org.apache.hadoop.io.SequenceFile.createWriter;
 import static org.hamcrest.CoreMatchers.equalTo;
 
 public class HdfsConsumerTest extends HdfsTestSupport {
+    private static final int ITERATIONS = 200;
 
     @Override
     public boolean isUseRouteBuilder() {
@@ -117,8 +118,6 @@ public class HdfsConsumerTest extends HdfsTestSupport {
             return;
         }
 
-        int ITERATIONS = 200;
-
         final File dir = new File("target/test/multiple-consumers");
         dir.mkdirs();
         for (int i = 1; i <= ITERATIONS; i++) {

http://git-wip-us.apache.org/repos/asf/camel/blob/e9d0cf4d/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/HdfsConsumerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/HdfsConsumerTest.java
b/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/HdfsConsumerTest.java
index 06115f1..fdbfd73 100644
--- a/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/HdfsConsumerTest.java
+++ b/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/HdfsConsumerTest.java
@@ -60,6 +60,7 @@ import static org.apache.hadoop.io.SequenceFile.CompressionType;
 import static org.hamcrest.CoreMatchers.equalTo;
 
 public class HdfsConsumerTest extends HdfsTestSupport {
+    private static final int ITERATIONS = 200;
 
     @Override
     public boolean isUseRouteBuilder() {
@@ -118,8 +119,6 @@ public class HdfsConsumerTest extends HdfsTestSupport {
             return;
         }
 
-        int ITERATIONS = 200;
-
         final File dir = new File("target/test/multiple-consumers");
         dir.mkdirs();
         for (int i = 1; i <= ITERATIONS; i++) {

http://git-wip-us.apache.org/repos/asf/camel/blob/e9d0cf4d/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/integration/HdfsAppendTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/integration/HdfsAppendTest.java
b/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/integration/HdfsAppendTest.java
index 5c3f7f8..0018446 100644
--- a/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/integration/HdfsAppendTest.java
+++ b/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/integration/HdfsAppendTest.java
@@ -29,6 +29,7 @@ import org.junit.Test;
 
 @Ignore("Must run manual")
 public class HdfsAppendTest extends CamelTestSupport {
+    private static final int ITERATIONS = 10;
 
     @Override
     public boolean isUseRouteBuilder() {
@@ -84,7 +85,6 @@ public class HdfsAppendTest extends CamelTestSupport {
 
     @Test
     public void testAppendWithDynamicFileName() throws Exception {
-        int ITERATIONS = 10;
 
         context.addRoutes(new RouteBuilder() {
             @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/e9d0cf4d/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/integration/HdfsProducerConsumerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/integration/HdfsProducerConsumerIntegrationTest.java
b/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/integration/HdfsProducerConsumerIntegrationTest.java
index c59efc2..cbe2e44 100644
--- a/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/integration/HdfsProducerConsumerIntegrationTest.java
+++ b/components/camel-hdfs2/src/test/java/org/apache/camel/component/hdfs2/integration/HdfsProducerConsumerIntegrationTest.java
@@ -16,25 +16,16 @@
  */
 package org.apache.camel.component.hdfs2.integration;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockComponent;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.impl.DefaultScheduledPollConsumerScheduler;
-import org.apache.camel.impl.JndiRegistry;
-import org.apache.camel.impl.PropertyPlaceholderDelegateRegistry;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataOutputStream;
@@ -44,10 +35,13 @@ import org.junit.After;
 import org.junit.Ignore;
 import org.junit.Test;
 
-import static org.hamcrest.CoreMatchers.*;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
 
 @Ignore("Must run manual")
 public class HdfsProducerConsumerIntegrationTest extends CamelTestSupport {
+    private static final int ITERATIONS = 400;
 
     @Override
     public boolean isUseRouteBuilder() {
@@ -89,7 +83,6 @@ public class HdfsProducerConsumerIntegrationTest extends CamelTestSupport
{
     @Test
     // see https://issues.apache.org/jira/browse/CAMEL-7318
     public void testMultipleConsumers() throws Exception {
-        int ITERATIONS = 400;
 
         Path p = new Path("hdfs://localhost:9000/tmp/test/multiple-consumers");
         FileSystem fs = FileSystem.get(p.toUri(), new Configuration());


Mime
View raw message