camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/3] camel git commit: CAMEL-10298: Remove readLockTimeout check from readLockMinAge
Date Sun, 11 Sep 2016 06:43:43 GMT
CAMEL-10298: Remove readLockTimeout check from readLockMinAge


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

Branch: refs/heads/master
Commit: c5aff65d80e0e3f90f47a17641b290daf5bd6a97
Parents: b3deccc
Author: Jyrki Ruuskanen <yuruki@kotikone.fi>
Authored: Thu Sep 8 14:03:00 2016 +0300
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Sep 11 08:43:28 2016 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/file/GenericFileEndpoint.java   | 6 ------
 .../component/file/strategy/FileChangedReadLockMinAgeTest.java | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c5aff65d/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
index d1efe7d..e251154 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
@@ -1365,12 +1365,6 @@ public abstract class GenericFileEndpoint<T> extends ScheduledPollEndpoint
imple
     protected void doStart() throws Exception {
         // validate that the read lock options is valid for the process strategy
         if (!"none".equals(readLock) && !"off".equals(readLock)) {
-            if (readLockTimeout > 0 && readLockMinAge > 0 && readLockTimeout
<= readLockCheckInterval + readLockMinAge) {
-                throw new IllegalArgumentException("The option readLockTimeout must be higher
than readLockCheckInterval + readLockMinAge"
-                    + ", was readLockTimeout=" + readLockTimeout + ", readLockCheckInterval+readLockMinAge="
+ (readLockCheckInterval + readLockMinAge)
-                    + ". A good practice is to let the readLockTimeout be at least readLockMinAge
+ 2 times the readLockCheckInterval"
-                    + " to ensure that the read lock procedure has enough time to acquire
the lock.");
-            }
             if (readLockTimeout > 0 && readLockTimeout <= readLockCheckInterval)
{
                 throw new IllegalArgumentException("The option readLockTimeout must be higher
than readLockCheckInterval"
                         + ", was readLockTimeout=" + readLockTimeout + ", readLockCheckInterval="
+ readLockCheckInterval

http://git-wip-us.apache.org/repos/asf/camel/blob/c5aff65d/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 4efcc2a..0a84a59 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
@@ -79,7 +79,7 @@ public class FileChangedReadLockMinAgeTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:target/changed/in?readLock=changed&readLockMinAge=3000")
+                from("file:target/changed/in?readLock=changed&readLockMinAge=3000&readLockTimeout=1500")
                         .to("file:target/changed/out", "mock:result");
             }
         };


Mime
View raw message