You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/08/20 18:06:26 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=14104076#comment-14104076 ] 

ASF GitHub Bot commented on STORM-464:
--------------------------------------

GitHub user revans2 opened a pull request:

    https://github.com/apache/incubator-storm/pull/234

    STORM-464: Simulated time advanced after test cluster exits causes inter...

    ...mitent test failures

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/revans2/incubator-storm STORM-464

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-storm/pull/234.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #234
    
----
commit 8604e9044ab08dedcb2851685b70abe54c278c2b
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Date:   2014-08-20T16:04:16Z

    STORM-464: Simulated time advanced after test cluster exits causes intermitent test failures

----


> 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)