Skip to content

Commit 348d7f3

Browse files
author
Nathan Marz
committed
update tests to have timeouts disabled by default to avoid accidental timeouts and broken tests
1 parent 9c14f8f commit 348d7f3

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

src/clj/backtype/storm/daemon/executor.clj

+12-9
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@
154154
(recursive-map
155155
:worker worker
156156
:worker-context worker-context
157+
:executor-id executor-id
157158
:task-ids task-ids
158159
:component-id component-id
159160
:storm-conf storm-conf
@@ -202,15 +203,17 @@
202203
receive-queue (:receive-queue executor-data)
203204
context (:worker-context executor-data)]
204205
(when tick-time-secs
205-
(schedule-recurring
206-
(:timer worker)
207-
tick-time-secs
208-
tick-time-secs
209-
(fn []
210-
(disruptor/publish
211-
receive-queue
212-
[[nil (TupleImpl. context [tick-time-secs] -1 Constants/SYSTEM_TICK_STREAM_ID)]]
213-
))))))
206+
(if-not (pos? tick-time-secs)
207+
(log-message "Timeouts disabled for executor " (:executor-id executor-data))
208+
(schedule-recurring
209+
(:timer worker)
210+
tick-time-secs
211+
tick-time-secs
212+
(fn []
213+
(disruptor/publish
214+
receive-queue
215+
[[nil (TupleImpl. context [tick-time-secs] -1 Constants/SYSTEM_TICK_STREAM_ID)]]
216+
)))))))
214217

215218
(defn mk-executor [worker executor-id]
216219
(let [executor-data (executor-data worker executor-id)

src/clj/backtype/storm/testing.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
daemon-conf (merge (read-storm-config)
102102
{TOPOLOGY-SKIP-MISSING-KRYO-REGISTRATIONS true
103103
ZMQ-LINGER-MILLIS 0
104+
TOPOLOGY-MESSAGE-TIMEOUT-SECS -1
104105
}
105106
daemon-conf
106107
{STORM-CLUSTER-MODE "local"
@@ -313,7 +314,6 @@
313314
(Thread/sleep 100)
314315
))
315316

316-
317317
(defprotocol CompletableSpout
318318
(exhausted? [this] "Whether all the tuples for this spout have been completed.")
319319
(cleanup [this] "Cleanup any global state kept")

0 commit comments

Comments
 (0)