[
https://issues.apache.org/jira/browse/STORM-464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14104171#comment-14104171
]
ASF GitHub Bot commented on STORM-464:
--------------------------------------
Github user ptgoetz commented on the pull request:
https://github.com/apache/incubator-storm/pull/234#issuecomment-52812367
Yeah, I think that was the cause of the failures I was seeing. Let me run a
few tests with this patch applied.
> Simulated time advanced after test cluster exits causes intermitent test
> failures
> ---------------------------------------------------------------------------------
>
> Key: STORM-464
> URL: https://issues.apache.org/jira/browse/STORM-464
> Project: Apache Storm (Incubating)
> Issue Type: Bug
> Affects Versions: 0.9.3-incubating
> Reporter: Robert Joseph Evans
> Assignee: Robert Joseph Evans
>
> As part of STORM-200 a simulated time cluster was hanging on shutdown because
> time was not advancing while the cluster was shutting down. A fix was put in
> for this to simulate time advancement in the background while the cluster was
> shut down, but the code did not wait for background process to finish. This
> resulted in simulated time being advanced in the background for other tests.
> It is a simple fix, just wait for the background process to stop before
> returning.
> I'll put up a pull request shortly
> ```
> diff --git a/storm-core/src/clj/backtype/storm/testing.clj
> b/storm-core/src/clj/backtype/storm/testing.clj
> index 54f40e0..0e4b23c 100644
> --- a/storm-core/src/clj/backtype/storm/testing.clj
> +++ b/storm-core/src/clj/backtype/storm/testing.clj
> @@ -235,10 +235,11 @@
> (log-error t# "Error in cluster")
> (throw t#))
> (finally
> - (let [keep-waiting?# (atom true)]
> - (future (while @keep-waiting?# (simulate-wait ~cluster-sym)))
> + (let [keep-waiting?# (atom true)
> + f# (future (while @keep-waiting?# (simulate-wait
> ~cluster-sym)))]
> (kill-local-storm-cluster ~cluster-sym)
> - (reset! keep-waiting?# false))))))
> + (reset! keep-waiting?# false)
> + @f#)))))
>
> (defmacro with-simulated-time-local-cluster
> [& args]
> ```
--
This message was sent by Atlassian JIRA
(v6.2#6252)