diff --git a/storm-core/src/clj/backtype/storm/testing.clj b/storm-core/src/clj/backtype/storm/testing.clj index 32f7f883d14..1a5f53e3189 100644 --- a/storm-core/src/clj/backtype/storm/testing.clj +++ b/storm-core/src/clj/backtype/storm/testing.clj @@ -230,7 +230,10 @@ (log-error t# "Error in cluster") (throw t#)) (finally - (kill-local-storm-cluster ~cluster-sym))))) + (let [keep-waiting?# (atom true)] + (future (while @keep-waiting?# (simulate-wait ~cluster-sym))) + (kill-local-storm-cluster ~cluster-sym) + (reset! keep-waiting?# false)))))) (defmacro with-simulated-time-local-cluster [& args]