This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-08
Channels
- # announcements (6)
- # beginners (100)
- # calva (17)
- # cljs-dev (31)
- # cljsrn (2)
- # clojars (3)
- # clojure (137)
- # clojure-australia (1)
- # clojure-europe (41)
- # clojure-gamedev (3)
- # clojure-italy (1)
- # clojure-nl (3)
- # clojure-poland (16)
- # clojure-serbia (7)
- # clojure-taiwan (1)
- # clojure-uk (10)
- # clojurescript (10)
- # cursive (25)
- # data-oriented-programming (4)
- # datomic (26)
- # fulcro (39)
- # graalvm (6)
- # jobs (2)
- # jobs-discuss (2)
- # kaocha (19)
- # klipse (1)
- # leiningen (3)
- # lsp (18)
- # malli (21)
- # meander (26)
- # off-topic (29)
- # pathom (39)
- # polylith (3)
- # practicalli (2)
- # re-frame (11)
- # reitit (8)
- # rewrite-clj (7)
- # sci (11)
- # shadow-cljs (44)
- # sql (8)
- # tools-deps (32)
- # xtdb (3)
Kaocha stopped working for no obvious reason. No error, just stuck:
% ./scripts/kaocha.sh
[(.)
… and then nothing. Process does not terminate. With no tests, kaocha
terminates but with even the most trivial test:
(deftest simple
(testing "never fails"
(is true)))
it gets stuck. Same if I let the test fail (is false)
. Any ideas what is happening here. Did work flawlessly before.My tests.edn
is this:
;; tests.edn
#kaocha/v1
{:tests [{:id :unit-cljs
:type :kaocha.type/cljs
:src-paths ["src/main"]
:test-paths ["src/test"]
:ns-patterns ["-test$"]}]}
Could you, once it has gotten stuck
- use jcmd
to find the process id of the kaocha process
- use jstack
to get the stack traces of that process
- share those (via http://gist.github.com/)
?
That way we can see exactly where it's stuck.
and if you could then put all of the above into https://github.com/lambdaisland/kaocha/issues that would be 🙏:skin-tone-2: 🙏:skin-tone-2: 🙏:skin-tone-2: 🎉
it's probably also a good idea to add :capture-output? false
to your tests.edn
, to make sure there aren't any warnings or other relevant output that's getting hidden.
You could also use :reporter :kaocha.report/debug
to get more verbose output, not sure how much that will tell us but it can't hurt.
Thanks @U07FP7QJ0, I will try later and let you know. If it still persists I’ll open an issue. Still have the feeling that it is something stupid on my side that I don’t see yet 😉
Okay, I found the troublemaker… I recently added some code to collect runtime stats in my re-frame based react native app with something like:
(defonce stats (atom {:counter 0}))
(defonce condition-eval-stats-timer
(js/setInterval (fn []
(swap! stats update :counter inc))
1000))
When removing the js/setInverval
kaocha behaves as expected. When isolating the problem in a minimal project I get this error after a while:
% ./bin/kaocha
WARNING: When invoking clojure.main, use -M
[(.)E]
Randomized with --seed 1001458186
ERROR in unit-cljs (main.java:40)
Unexpected error executing kaocha-cljs test suite.
Exception: clojure.lang.ExceptionInfo: Failed cleaning up ClojureScript runtime
{:cljs/last-val "nil", :ws/disconnected? true, :ws/connected? false}
at kaocha.type.cljs$eval6734$fn__6736$fn__6758.invoke (cljs.clj:302)
kaocha.type.cljs$queue_consumer.invokeStatic (cljs.clj:181)
kaocha.type.cljs$queue_consumer.invoke (cljs.clj:173)
kaocha.type.cljs$eval6734$fn__6736.invoke (cljs.clj:298)
...
kaocha.plugin.capture_output$capture_output_wrap_run_hook$fn__2618$fn__2619.invoke (capture_output.clj:83)
...
kaocha.plugin.capture_output$capture_output_wrap_run_hook$fn__2618.doInvoke (capture_output.clj:83)
...
kaocha.testable$run.invokeStatic (testable.clj:128)
kaocha.testable$run.invoke (testable.clj:119)
kaocha.testable$run_testable.invokeStatic (testable.clj:212)
kaocha.testable$run_testable.invoke (testable.clj:157)
kaocha.testable$run_testables.invokeStatic (testable.clj:225)
kaocha.testable$run_testables.invoke (testable.clj:215)
kaocha.api$run$fn__3124$fn__3125$fn__3126.invoke (api.clj:137)
...
kaocha.api$run$fn__3124$fn__3125.invoke (api.clj:111)
...
kaocha.api$run$fn__3124.invoke (api.clj:110)
...
kaocha.api$run.invokeStatic (api.clj:96)
kaocha.api$run.invoke (api.clj:83)
kaocha.runner$run.invokeStatic (runner.clj:133)
kaocha.runner$run.invoke (runner.clj:74)
kaocha.runner$_main_STAR_.invokeStatic (runner.clj:172)
kaocha.runner$_main_STAR_.doInvoke (runner.clj:145)
...
kaocha.runner$_main.invokeStatic (runner.clj:183)
kaocha.runner$_main.doInvoke (runner.clj:181)
...
0 tests, 1 assertions, 1 errors, 0 failures.
If opening an issue is still worth doing, please let me know and I will do so.Gist with stacktrace as requested above: https://gist.github.com/kreutter/e1e445da2ff6d4815d8b7ba4eff77e00
Ok I missed that this is a kaocha-cljs issue, please mention that LOUD AND CLEAR next time, that's a completely different ball game than just plain kaocha
Okay. I promise. But is that behaviour expected or a bug? Should I raise an issue or not?
hmm seems to work fine, yeah please file an issue. You can find information in the kaocha-cljs repo for getting verbose output from kaocha-cljs