Robert Joseph Evans created STORM-464:
-----------------------------------------

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

Reply via email to