Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test reporter can't handle interrupted test #3677

Open
r0man opened this issue May 23, 2024 · 2 comments
Open

Test reporter can't handle interrupted test #3677

r0man opened this issue May 23, 2024 · 2 comments
Labels

Comments

@r0man
Copy link
Contributor

r0man commented May 23, 2024

Expected behavior

When interrupting the following test case with M-x cider-interrupt:

(deftest test-interrupt
  (while true))

I see the following stacktrace in the REPL buffer:

Exception in thread "nREPL-session-f0ebf9b1-a964-4c8e-95bd-201dbe208f32" java.lang.IllegalArgumentException: no conversion to symbol
	at clojure.core$symbol.invokeStatic(core.clj:598)
	at clojure.core$symbol.invoke(core.clj:591)
	at cider.nrepl.middleware.test$report_fixture_error.invokeStatic(test.clj:269)
	at cider.nrepl.middleware.test$report_fixture_error.invoke(test.clj:258)
	at cider.nrepl.middleware.test$test_vars.invokeStatic(test.clj:348)
	at cider.nrepl.middleware.test$test_vars.invoke(test.clj:324)
	at cider.nrepl.middleware.test$test_ns.invokeStatic(test.clj:364)
	at cider.nrepl.middleware.test$test_ns.invoke(test.clj:350)
	at cider.nrepl.middleware.test$test_var_query$fn__12659.invoke(test.clj:383)

Actual behavior

I would expect to see a "Evaluation interrupted" message or something similar and the test reporter to not crash.

Steps to reproduce the problem

  • Move point over the test case
  • Run M-x cider-test-run-test to start the test
  • Run M-x cider-interrupt to interrupt the test
  • Take a look at the REPL buffer to see the stacktrace

Environment & Version information

Linux precision 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 GNU/Linux

CIDER version information

;; CIDER 1.13.1 (Santiago), nREPL 1.0.0
;; Clojure 1.11.1, Java 1.8.0_402

The same happens with nREPL 1.2.0-beta1 which I tried initially.

Lein / Clojure CLI version

Leiningen 2.10.0 on Java 1.8.0_402 OpenJDK 64-Bit Server VM

Emacs version

29.3

Operating system

Ubuntu 22.04.4 LTS

JDK distribution

openjdk version "1.8.0_402"
OpenJDK Runtime Environment (build 1.8.0_402-8u402-ga-2ubuntu1~22.04-b06)
OpenJDK 64-Bit Server VM (build 25.402-b06, mixed mode)

@alexander-yakushev
Copy link
Member

By the way, it works correctly if the interrupted code is wrapped in is.

(deftest test-interrupt
  (is (while true)))
image

@r0man r0man added the bug label May 23, 2024
@r0man
Copy link
Contributor Author

r0man commented May 23, 2024

Oh, interesting. That's what I actually wanted to test. :) Still room for improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants