Skip to content

Commit

Permalink
fix graceful stop test
Browse files Browse the repository at this point in the history
  • Loading branch information
darkleaf committed Dec 22, 2024
1 parent 7735ee6 commit 00f0ed4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions test/darkleaf/di/tutorial/y_graceful_stop_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
;; It throws with original exception.
;; All other possible exceptions are added as suppressed.

(defn ex-map-wo-via [ex]
(-> ex
Throwable->map
(dissoc :via)))

(defn root
{::di/kind :component}
[{dep `dep
Expand All @@ -37,7 +32,7 @@
::on-stop-dep-ex on-stop-dep-ex}
ex (try
(di/start `root registry)
(catch Throwable ex
(catch Exception ex
ex))]
(t/is (= (ex-map-wo-via on-start-root-ex) (ex-map-wo-via ex)))
(t/is (= on-start-root-ex (ex-cause ex)))
(t/is (= [on-stop-dep-ex] (vec (.getSuppressed ex))))))

0 comments on commit 00f0ed4

Please sign in to comment.