You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2014/06/06 18:46:56 UTC
[3/6] git commit: Speed up new test
Speed up new test
Project: http://git-wip-us.apache.org/repos/asf/incubator-storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-storm/commit/a9180599
Tree: http://git-wip-us.apache.org/repos/asf/incubator-storm/tree/a9180599
Diff: http://git-wip-us.apache.org/repos/asf/incubator-storm/diff/a9180599
Branch: refs/heads/master
Commit: a9180599317e2741559418165ebc7178008147a1
Parents: 4a8fc69
Author: Kyle Nusbaum <kn...@yahoo-inc.com>
Authored: Wed Jun 4 18:35:16 2014 +0000
Committer: Kyle Nusbaum <kn...@yahoo-inc.com>
Committed: Wed Jun 4 18:35:16 2014 +0000
----------------------------------------------------------------------
storm-core/src/clj/backtype/storm/daemon/drpc.clj | 3 ++-
storm-core/test/clj/backtype/storm/drpc_test.clj | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/a9180599/storm-core/src/clj/backtype/storm/daemon/drpc.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/drpc.clj b/storm-core/src/clj/backtype/storm/daemon/drpc.clj
index 956a431..890cfc7 100644
--- a/storm-core/src/clj/backtype/storm/daemon/drpc.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/drpc.clj
@@ -52,6 +52,7 @@
(swap! id->result dissoc id)
(swap! id->start dissoc id))
my-ip (.getHostAddress (InetAddress/getLocalHost))
+ async-repeat-time (or (conf TIMEOUT-CHECK-SECS) TIMEOUT-CHECK-SECS)
clear-thread (async-loop
(fn []
(doseq [[id start] @id->start]
@@ -60,7 +61,7 @@
(.release sem))
(cleanup id)
))
- TIMEOUT-CHECK-SECS
+ async-repeat-time
))
]
(reify DistributedRPC$Iface
http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/a9180599/storm-core/test/clj/backtype/storm/drpc_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/backtype/storm/drpc_test.clj b/storm-core/test/clj/backtype/storm/drpc_test.clj
index 6251a3a..1fd5ca4 100644
--- a/storm-core/test/clj/backtype/storm/drpc_test.clj
+++ b/storm-core/test/clj/backtype/storm/drpc_test.clj
@@ -223,9 +223,10 @@
(deftest test-drpc-timeout-cleanup
(let [queue (ConcurrentLinkedQueue.)
- delay-seconds 2]
+ delay-seconds 1]
(stubbing [acquire-queue queue
- read-storm-config {DRPC-REQUEST-TIMEOUT-SECS delay-seconds}]
+ read-storm-config {DRPC-REQUEST-TIMEOUT-SECS delay-seconds
+ TIMEOUT-CHECK-SECS delay-seconds}]
(let [drpc-handler (service-handler)]
(is (thrown? DRPCExecutionException
(.execute drpc-handler "ArbitraryDRPCFunctionName" "no-args")))))))