Add test for disable tuple timeout
Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/5c9d06bc Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/5c9d06bc Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/5c9d06bc Branch: refs/heads/master Commit: 5c9d06bcb280c5059497929d7910a9a8d07349ac Parents: 0505d47 Author: Jungtaek Lim <kabh...@gmail.com> Authored: Sun Nov 9 12:12:13 2014 +0900 Committer: Jungtaek Lim <kabh...@gmail.com> Committed: Sun Nov 9 12:12:13 2014 +0900 ---------------------------------------------------------------------- .../test/clj/backtype/storm/testing4j_test.clj | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/5c9d06bc/storm-core/test/clj/backtype/storm/testing4j_test.clj ---------------------------------------------------------------------- diff --git a/storm-core/test/clj/backtype/storm/testing4j_test.clj b/storm-core/test/clj/backtype/storm/testing4j_test.clj index bb920af..36f3df6 100644 --- a/storm-core/test/clj/backtype/storm/testing4j_test.clj +++ b/storm-core/test/clj/backtype/storm/testing4j_test.clj @@ -157,6 +157,38 @@ (it/assert-failed tracker 2) )))))) +(deftest test-disable-tuple-timeout + (let [daemon-conf (doto (Config.) + (.put TOPOLOGY-ENABLE-MESSAGE-TIMEOUTS false)) + mk-cluster-param (doto (MkClusterParam.) + (.setDaemonConf daemon-conf))] + (Testing/withSimulatedTimeLocalCluster + mk-cluster-param + (reify TestJob + (^void run [this ^ILocalCluster cluster] + (let [feeder (feeder-spout ["field1"]) + tracker (AckFailMapTracker.) + _ (.setAckFailDelegate feeder tracker) + topology (thrift/mk-topology + {"1" (thrift/mk-spout-spec feeder)} + {"2" (thrift/mk-bolt-spec {"1" :global} it/ack-every-other)}) + storm-conf (doto (Config.) + (.put TOPOLOGY-MESSAGE-TIMEOUT-SECS 10) + (.put TOPOLOGY-ENABLE-MESSAGE-TIMEOUTS false))] + (.submitTopology cluster + "disable-timeout-tester" + storm-conf + topology) + (.feed feeder ["a"] 1) + (.feed feeder ["b"] 2) + (.feed feeder ["c"] 3) + (Testing/advanceClusterTime cluster (int 9)) + (it/assert-acked tracker 1 3) + (is (not (.isFailed tracker 2))) + (Testing/advanceClusterTime cluster (int 12)) + (is (not (.isFailed tracker 2))) + )))))) + (deftest test-test-tuple (letlocals ;; test the one-param signature