Skip to content

Commit

Permalink
Merge e1138e9 into dc012ee
Browse files Browse the repository at this point in the history
  • Loading branch information
msbond committed Jun 4, 2019
2 parents dc012ee + e1138e9 commit 0a01a9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/ziggurat/init.clj
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@
(defn stop
"Calls the Ziggurat's state stop fns and then actor-stop-fn."
[actor-stop-fn]
(actor-stop-fn)
(mount/stop #'config/config
#'statsd-reporter
#'messaging-connection/connection
#'server/server
#'nrepl-server/server
#'streams/stream)
(actor-stop-fn)
(mount/stop #'config/config))
#'streams/stream))

(defn- add-shutdown-hook [actor-stop-fn]
(.addShutdownHook
Expand Down
4 changes: 2 additions & 2 deletions test/ziggurat/init_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
(is (= 16 @result))))))

(deftest stop-calls-actor-stop-fn-test
(testing "The actor stop fn stops after the ziggurat state"
(testing "The actor stop fn stops before the ziggurat state"
(let [result (atom 1)]
(with-redefs [streams/start-streams (constantly nil)
streams/stop-streams (fn [_] (reset! result (* @result 2)))
config/config-file "config.test.edn"]
(init/start #() {} [])
(init/stop #(reset! result (+ @result 3)))
(is (= 5 @result))))))
(is (= 8 @result))))))

(deftest start-calls-make-queues-test
(testing "Start calls make queues"
Expand Down

0 comments on commit 0a01a9d

Please sign in to comment.