Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x bef5bded7 -> 0399fd40c
  refs/heads/master 2ab4bf65d -> 77c7ab221


Fixed potential test error


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

Branch: refs/heads/master
Commit: 77c7ab2219e40418a500ad2e1bc2b155127b0292
Parents: 2ab4bf6
Author: Claus Ibsen <davscl...@apache.org>
Authored: Sun Nov 22 09:20:08 2015 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Sun Nov 22 09:20:08 2015 +0100

----------------------------------------------------------------------
 .../src/test/java/org/apache/camel/TestSupport.java       | 10 +++++++++-
 .../FileChangedReadLockMinAgeShortCircuitTest.java        |  2 +-
 .../file/strategy/FileChangedReadLockMinAgeTest.java      |  3 +--
 3 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/77c7ab22/camel-core/src/test/java/org/apache/camel/TestSupport.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/TestSupport.java 
b/camel-core/src/test/java/org/apache/camel/TestSupport.java
index ed76051..6d91a26 100644
--- a/camel-core/src/test/java/org/apache/camel/TestSupport.java
+++ b/camel-core/src/test/java/org/apache/camel/TestSupport.java
@@ -73,13 +73,21 @@ public abstract class TestSupport extends TestCase {
     }
 
     /**
-     * Returns a value builder for the given property
+     * Returns a value builder for the given exchange property
      */
+    @Deprecated
     public static ValueBuilder property(String name) {
         return Builder.exchangeProperty(name);
     }
 
     /**
+     * Returns a value builder for the given exchange property
+     */
+    public static ValueBuilder exchangeProperty(String name) {
+        return Builder.exchangeProperty(name);
+    }
+
+    /**
      * Returns a predicate and value builder for the inbound body on an 
exchange
      */
     public static ValueBuilder body() {

http://git-wip-us.apache.org/repos/asf/camel/blob/77c7ab22/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 524452d..b5db872 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).convertTo(long.class).isLessThan(new
 Date().getTime() + 15000));
+        
mock.expectedMessagesMatches(exchangeProperty(Exchange.RECEIVED_TIMESTAMP).convertTo(long.class).isLessThan(new
 Date().getTime() + 15000));
 
         assertMockEndpointsSatisfied();
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/77c7ab22/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 c0690fc..4efcc2a 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
@@ -45,8 +45,7 @@ public class FileChangedReadLockMinAgeTest extends 
ContextTestSupport {
         MockEndpoint mock = getMockEndpoint("mock:result");
         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).convertTo(long.class).isGreaterThan(new
 Date().getTime() + 5000));
+        
mock.expectedMessagesMatches(exchangeProperty(Exchange.RECEIVED_TIMESTAMP).convertTo(long.class).isGreaterThan(new
 Date().getTime() + 3000));
 
         writeSlowFile();
 

Reply via email to