storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [05/50] git commit: Correct argument order to retry construct and fix unit tests
Date Wed, 24 Sep 2014 17:56:32 GMT
Correct argument order to retry construct and fix unit tests


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

Branch: refs/heads/security
Commit: 24749f1b18508de151e892dbb756c721bec29f1b
Parents: e9ee271
Author: Kishor Patil <kpatil@yahoo-inc.com>
Authored: Thu Aug 28 00:30:23 2014 -0500
Committer: Kishor Patil <kpatil@yahoo-inc.com>
Committed: Thu Aug 28 00:30:23 2014 -0500

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/utils/Utils.java | 4 ++--
 storm-core/test/clj/backtype/storm/utils_test.clj  | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/24749f1b/storm-core/src/jvm/backtype/storm/utils/Utils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/utils/Utils.java b/storm-core/src/jvm/backtype/storm/utils/Utils.java
index 2c91ec5..77580c4 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@ -361,8 +361,8 @@ public class Utils {
                 .sessionTimeoutMs(Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT)))
                 .retryPolicy(new StormBoundedExponentialBackoffRetry(
                             Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL)),
-                            Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_TIMES)),
-                            Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL_CEILING))));
+                            Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL_CEILING)),
+                            Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_RETRY_TIMES))));
         if(auth!=null && auth.scheme!=null) {
             builder = builder.authorization(auth.scheme, auth.payload);
         }

http://git-wip-us.apache.org/repos/asf/storm/blob/24749f1b/storm-core/test/clj/backtype/storm/utils_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/backtype/storm/utils_test.clj b/storm-core/test/clj/backtype/storm/utils_test.clj
index 2294893..438c4a7 100644
--- a/storm-core/test/clj/backtype/storm/utils_test.clj
+++ b/storm-core/test/clj/backtype/storm/utils_test.clj
@@ -25,7 +25,7 @@
 (deftest test-new-curator-uses-exponential-backoff
   (let [expected_interval 2400
         expected_retries 10
-        expected_ceiling (/ expected_interval 2)
+        expected_ceiling 3000
         conf (merge (clojurify-structure (Utils/readDefaultConfig))
           {Config/STORM_ZOOKEEPER_RETRY_INTERVAL expected_interval
            Config/STORM_ZOOKEEPER_RETRY_TIMES expected_retries
@@ -38,7 +38,6 @@
     (is (.isAssignableFrom ExponentialBackoffRetry (.getClass retry)))
     (is (= (.getBaseSleepTimeMs retry) expected_interval))
     (is (= (.getN retry) expected_retries))
-    (is (= (.getMaxRetryInterval retry) expected_ceiling))
     (is (= (.getSleepTimeMs retry 10 0) expected_ceiling))
   )
 )


Mime
View raw message