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 2015/03/04 08:27:10 UTC

[3/3] camel git commit: CAMEL-8421: Polished

CAMEL-8421: Polished


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

Branch: refs/heads/master
Commit: 5d8a4b0450d584355cbdd54815c3211c58d72958
Parents: 772e337
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Mar 4 08:28:21 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Mar 4 08:28:21 2015 +0100

----------------------------------------------------------------------
 .../strategy/FileChangedReadLockMinAgeShortCircuitTest.java     | 5 +++--
 .../component/file/strategy/FileChangedReadLockMinAgeTest.java  | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5d8a4b04/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeShortCircuitTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeShortCircuitTest.java b/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeShortCircuitTest.java
index 1f4b388..3ab312a 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeShortCircuitTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeShortCircuitTest.java
@@ -47,7 +47,7 @@ public class FileChangedReadLockMinAgeShortCircuitTest extends ContextTestSuppor
         mock.expectedMessageCount(1);
         mock.expectedFileExists("target/changed/out/file.dat");
         // We should get the file on the first poll
-        mock.expectedMessagesMatches(property(Exchange.RECEIVED_TIMESTAMP).isLessThan(new Date().getTime()+15000));
+        mock.expectedMessagesMatches(property(Exchange.RECEIVED_TIMESTAMP).convertTo(long.class).isLessThan(new Date().getTime()+15000));
 
         assertMockEndpointsSatisfied();
     }
@@ -67,7 +67,8 @@ public class FileChangedReadLockMinAgeShortCircuitTest extends ContextTestSuppor
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:target/changed/in?readLock=changed&readLockMinAge=500&readLockCheckInterval=30000&readLockTimeout=90000").to("file:target/changed/out", "mock:result");
+                from("file:target/changed/in?readLock=changed&readLockMinAge=500&readLockCheckInterval=30000&readLockTimeout=90000")
+                        .to("file:target/changed/out", "mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/5d8a4b04/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeTest.java b/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeTest.java
index 2dffcc9..f73d100 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockMinAgeTest.java
@@ -46,7 +46,7 @@ public class FileChangedReadLockMinAgeTest extends ContextTestSupport {
         mock.expectedMessageCount(1);
         mock.expectedFileExists("target/changed/out/slowfile.dat");
         // writing takes ~2 seconds, and then it has to age for at least minAge milliseconds (3 seconds)
-        mock.expectedMessagesMatches(property(Exchange.RECEIVED_TIMESTAMP).isGreaterThan(new Date().getTime()+5000));
+        mock.expectedMessagesMatches(property(Exchange.RECEIVED_TIMESTAMP).convertTo(long.class).isGreaterThan(new Date().getTime()+5000));
 
         writeSlowFile();
 
@@ -80,7 +80,8 @@ public class FileChangedReadLockMinAgeTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:target/changed/in?readLock=changed&readLockMinAge=3000").to("file:target/changed/out", "mock:result");
+                from("file:target/changed/in?readLock=changed&readLockMinAge=3000")
+                        .to("file:target/changed/out", "mock:result");
             }
         };
     }