Permalink
Browse files

Change ceiling test to be deterministic

  • Loading branch information...
1 parent 169bae4 commit 7b7617fc1dd956af431ba589521f38649a8f4733 @d2r d2r committed Feb 20, 2013
Showing with 2 additions and 7 deletions.
  1. +2 −7 test/clj/backtype/storm/util_test.clj
@@ -9,7 +9,7 @@
(deftest test-new-curator-uses-exponential-backoff
(let [expected_interval 2400
expected_retries 10
- expected_ceiling 5000
+ expected_ceiling (/ expected_interval 2)
conf (merge (clojurify-structure (Utils/readDefaultConfig))
{Config/STORM_ZOOKEEPER_RETRY_INTERVAL expected_interval
Config/STORM_ZOOKEEPER_RETRY_TIMES expected_retries
@@ -23,11 +23,6 @@
(is (= (.getBaseSleepTimeMs retry) expected_interval))
(is (= (.getN retry) expected_retries))
(is (= (.getMaxRetryInterval retry) expected_ceiling))
- ; It would be very unlikely for this to fail three times.
- (is (or
- (= (.getSleepTimeMs retry 10 0) expected_ceiling)
- (= (.getSleepTimeMs retry 10 0) expected_ceiling)
- (= (.getSleepTimeMs retry 10 0) expected_ceiling)
- ))
+ (is (= (.getSleepTimeMs retry 10 0) expected_ceiling))
)
)

0 comments on commit 7b7617f

Please sign in to comment.