-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Expected behavior
I run tests using CIDER, regardless of whether I have Ultra in my lein profile, regardless of the values in maps being passed from function to function, and the tests complete.
Actual behavior
With Ultra in my lein profile, CIDER hangs indefinitely when running tests which call a function that returns certain values (a decimal in one case, an integer in another; I suspect other cases exist).
Steps to reproduce the problem
- Have
{:user {:plugins [[venantius/ultra "0.5.2"]]}}
in ~/.lein/profiles.clj lein new decimal-bug
- Create new function in that project's file src/decimal_bug/core.clj:
(defn bar [] {:number 1})
and save the buffer - Replace
a-test
with this new test in that project's file test/decimal_bug/core_test.clj:(deftest decimal-test (testing "documenting CIDER decimal bug" (is (map? (bar)))))
M-x cider-jack-in
/C-c M-j
M-x cider-test-run-ns-tests
/C-c C-t C-n
, tests complete and pass almost instantly, all is well- Change
bar
to now return{:number 1.0}
- (Optional) For clarity, especially for folks using
cider-test-show-report-on-success
, add an assertion to our test, so that it is clear that the*cider-test-report*
does not successfully return:(deftest decimal-test (testing "documenting CIDER decimal bug" (is (map? (bar))) (is (number? (val (first (bar)))))))
M-x cider-test-run-ns-tests
/C-c C-t C-n
, 💥 tests hang indefinitely, CIDER must be shut down manually
I could also get the tests to hang with bar
returning simply 1 and decimal-test
checking (number? (bar))
.
All these issues with hanging seem to disappear when I remove ultra from ~/.lein/profiles.clj.
Environment & Version information
CIDER version information
;; CIDER 0.16.0 (Riga), nREPL 0.2.13
;; Clojure 1.8.0, Java 1.8.0_151
Lein/Boot version
Leiningen 2.8.1 on Java 1.8.0_151 Java HotSpot(TM) 64-Bit Server VM
Emacs version
GNU Emacs 25.3.1 (x86_64-apple-darwin17.2.0, Carbon Version 158 AppKit 1561.1) of 2018-01-05
Operating system
MacOS High Sierra 10.13.2 (17C88)