Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-464

Simulated time advanced after test cluster exits causes intermitent test failures

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.3
    • 0.9.3
    • storm-core
    • None

    Description

      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]
      ```

      Attachments

        Activity

          People

            revans2 Robert Joseph Evans
            revans2 Robert Joseph Evans
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: