You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Rick Kellogg (JIRA)" <ji...@apache.org> on 2015/10/05 03:56:28 UTC

[jira] [Updated] (STORM-464) Simulated time advanced after test cluster exits causes intermitent test failures

     [ https://issues.apache.org/jira/browse/STORM-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Kellogg updated STORM-464:
-------------------------------
    Component/s: storm-core

> 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
>          Issue Type: Bug
>          Components: storm-core
>    Affects Versions: 0.9.3
>            Reporter: Robert Joseph Evans
>            Assignee: Robert Joseph Evans
>             Fix For: 0.9.3
>
>
> 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.3.4#6332)