curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [28/32] git commit: Make sure system prop timing-waiting-multiple is always used
Date Mon, 22 Jul 2013 23:27:03 GMT
Make sure system prop timing-waiting-multiple is always used


Project: http://git-wip-us.apache.org/repos/asf/incubator-curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-curator/commit/477cb13e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-curator/tree/477cb13e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-curator/diff/477cb13e

Branch: refs/heads/CURATOR-14
Commit: 477cb13e50760d8fe0044cb003a96ee4f75afde7
Parents: c8942b1
Author: randgalt <randgalt@apache.org>
Authored: Sun Jul 7 10:55:41 2013 -0700
Committer: randgalt <randgalt@apache.org>
Committed: Sun Jul 7 10:55:41 2013 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/curator/test/Timing.java    | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/477cb13e/curator-test/src/main/java/org/apache/curator/test/Timing.java
----------------------------------------------------------------------
diff --git a/curator-test/src/main/java/org/apache/curator/test/Timing.java b/curator-test/src/main/java/org/apache/curator/test/Timing.java
index 2bd9159..f29b1c5 100644
--- a/curator-test/src/main/java/org/apache/curator/test/Timing.java
+++ b/curator-test/src/main/java/org/apache/curator/test/Timing.java
@@ -41,11 +41,7 @@ public class Timing
      */
     public Timing()
     {
-        this
-        (
-            Integer.getInteger("timing-multiple", 1),
-            Integer.getInteger("timing-waiting-multiple", DEFAULT_WAITING_MULTIPLE)
-        );
+        this(Integer.getInteger("timing-multiple", 1), getWaitingMultiple());
     }
 
     /**
@@ -55,7 +51,7 @@ public class Timing
      */
     public Timing(double multiple)
     {
-        this((long)(DEFAULT_SECONDS * multiple), TimeUnit.SECONDS, DEFAULT_WAITING_MULTIPLE);
+        this((long)(DEFAULT_SECONDS * multiple), TimeUnit.SECONDS, getWaitingMultiple());
     }
 
     /**
@@ -75,7 +71,7 @@ public class Timing
      */
     public Timing(long value, TimeUnit unit)
     {
-        this(value, unit, DEFAULT_WAITING_MULTIPLE);
+        this(value, unit, getWaitingMultiple());
     }
 
     /**
@@ -222,4 +218,9 @@ public class Timing
     {
         return milliseconds();
     }
+
+    private static Integer getWaitingMultiple()
+    {
+        return Integer.getInteger("timing-waiting-multiple", DEFAULT_WAITING_MULTIPLE);
+    }
 }


Mime
View raw message