Skip to content

Commit 7fff243

Browse files
committed
Fix tests on clojure 1.3.0
1 parent dd75ce2 commit 7fff243

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/test/clojure/clojure/java/test_jmx.clj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,4 +229,11 @@
229229
(jmx/register-mbean mbean mbean-name)
230230
(is (= 123 (jmx/read mbean-name :a-property)))
231231
(jmx/unregister-mbean mbean-name)
232-
(is (thrown? InstanceNotFoundException (jmx/read mbean-name :a-property)))))
232+
(if (= [1 3] [(*clojure-version* :major) (*clojure-version* :minor)])
233+
; clojure 1.3 throws RuntimeException directly for some reason so catch that and
234+
; verify that the underlying exception is right
235+
(try
236+
(jmx/read mbean-name :a-property)
237+
(catch RuntimeException e
238+
(is (instance? InstanceNotFoundException (.getCause e)))))
239+
(is (thrown? InstanceNotFoundException (jmx/read mbean-name :a-property))))))

0 commit comments

Comments
 (0)