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

Occasional opaque errors when using fail-fast #10

Closed
vemv opened this issue Oct 15, 2018 · 5 comments
Closed

Occasional opaque errors when using fail-fast #10

vemv opened this issue Oct 15, 2018 · 5 comments

Comments

@vemv
Copy link

vemv commented Oct 15, 2018

The fail-fast option is generally working for me, but sometimes I get the following:

Randomized with --seed 489190246
[......FException in thread "main" clojure.lang.ExceptionInfo: throw+: #:kaocha{:fail-fast true} #:kaocha{:fail-fast true}, compiling:(/private/var/folders/kx/y0pmr4bs5f3dcg4mvw6bg5nr0000gn/T/form-init5139607091255462395.clj:1:125)
	at clojure.lang.Compiler.load(Compiler.java:7526)
	at clojure.lang.Compiler.loadFile(Compiler.java:7452)
	at clojure.main$load_script.invokeStatic(main.clj:278)
	at clojure.main$init_opt.invokeStatic(main.clj:280)
	at clojure.main$init_opt.invoke(main.clj:280)
	at clojure.main$initialize.invokeStatic(main.clj:311)
	at clojure.main$null_opt.invokeStatic(main.clj:345)
	at clojure.main$null_opt.invoke(main.clj:342)
	at clojure.main$main.invokeStatic(main.clj:424)
	at clojure.main$main.doInvoke(main.clj:387)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.main.main(main.java:37)
Caused by: clojure.lang.ExceptionInfo: throw+: #:kaocha{:fail-fast true} {:kaocha/fail-fast true}
	at slingshot.support$stack_trace.invoke(support.clj:201)
	at kaocha.report$fail_fast.invokeStatic(report.clj:251)
	at kaocha.report$fail_fast.invoke(report.clj:245)
	at kaocha.config$resolve_reporter$fn__46035$fn__46036.invoke(config.clj:101)
	at clojure.core$run_BANG_$fn__8431.invoke(core.clj:7635)
	at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:63)
	at clojure.core.protocols$fn__7847.invokeStatic(protocols.clj:136)
	at clojure.core.protocols$fn__7847.invoke(protocols.clj:124)
	at clojure.core.protocols$fn__7807$G__7802__7816.invoke(protocols.clj:19)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
	at clojure.core.protocols$fn__7835.invokeStatic(protocols.clj:75)
	at clojure.core.protocols$fn__7835.invoke(protocols.clj:75)
	at clojure.core.protocols$fn__7781$G__7776__7794.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6748)
	at clojure.core$run_BANG_.invokeStatic(core.clj:7630)
	at clojure.core$run_BANG_.invoke(core.clj:7630)
	at kaocha.config$resolve_reporter$fn__46035.invoke(config.clj:101)
	at kaocha.monkey_patch$eval46196$fn__46197$fn__46198.invoke(monkey_patch.clj:50)
	at kaocha.type.var$eval46955$fn__46957.invoke(var.clj:32)
	at clojure.lang.MultiFn.invoke(MultiFn.java:233)
	at kaocha.testable$run.invokeStatic(testable.clj:91)
	at kaocha.testable$run.invoke(testable.clj:83)
	at kaocha.testable$run_testables.invokeStatic(testable.clj:122)
	at kaocha.testable$run_testables.invoke(testable.clj:112)
	at clojure.lang.Atom.swap(Atom.java:51)
	at clojure.core$swap_BANG_.invokeStatic(core.clj:2345)
	at clojure.core$swap_BANG_.invoke(core.clj:2337)
	at kaocha.type.ns$run_tests$fn__47019.invoke(ns.clj:52)
	at clojure.test$default_fixture.invokeStatic(test.clj:686)
	at clojure.test$default_fixture.invoke(test.clj:682)
	at kaocha.type.ns$run_tests.invokeStatic(ns.clj:52)
	at kaocha.type.ns$run_tests.invoke(ns.clj:48)
	at kaocha.type.ns$eval47023$fn__47024.invoke(ns.clj:70)
	at clojure.lang.MultiFn.invoke(MultiFn.java:233)
	at kaocha.testable$run.invokeStatic(testable.clj:91)
	at kaocha.testable$run.invoke(testable.clj:83)
	at kaocha.testable$run_testables.invokeStatic(testable.clj:122)
	at kaocha.testable$run_testables.invoke(testable.clj:112)
	at kaocha.type.clojure.test$eval47225$fn__47226.invoke(test.clj:16)
	at clojure.lang.MultiFn.invoke(MultiFn.java:233)
	at kaocha.testable$run.invokeStatic(testable.clj:91)
	at kaocha.testable$run.invoke(testable.clj:83)
	at kaocha.testable$run_testables.invokeStatic(testable.clj:122)
	at kaocha.testable$run_testables.invoke(testable.clj:112)
	at clojure.lang.AFn.applyToHelper(AFn.java:156)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:657)
	at clojure.core$apply.invoke(core.clj:652)
	at kaocha.plugin.capture_output$eval45533$fn__45534$fn__45539$fn__45540$fn__45541.invoke(capture_output.clj:79)
	at clojure.core$with_redefs_fn.invokeStatic(core.clj:7434)
	at clojure.core$with_redefs_fn.invoke(core.clj:7418)
	at kaocha.plugin.capture_output$eval45533$fn__45534$fn__45539$fn__45540.doInvoke(capture_output.clj:79)
	at clojure.lang.RestFn.invoke(RestFn.java:421)
	at kaocha.api$run$fn__46263.invoke(api.clj:68)
	at clojure.core$with_redefs_fn.invokeStatic(core.clj:7434)
	at clojure.core$with_redefs_fn.invoke(core.clj:7418)
	at kaocha.api$run.invokeStatic(api.clj:59)
	at kaocha.api$run.invoke(api.clj:46)
	at kaocha.runner$_main_STAR_.invokeStatic(runner.clj:130)
	at kaocha.runner$_main_STAR_.doInvoke(runner.clj:72)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:657)
	at clojure.core$apply.invoke(core.clj:652)
	at kaocha.runner$_main.invokeStatic(runner.clj:139)
	at kaocha.runner$_main.doInvoke(runner.clj:137)
	at clojure.lang.RestFn.invoke(RestFn.java:421)
	at clojure.lang.Var.invoke(Var.java:385)
	at user$eval43604.invokeStatic(form-init5139607091255462395.clj:1)
	at user$eval43604.invoke(form-init5139607091255462395.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7062)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.load(Compiler.java:7514)

Note that there are no project-specific ns's at all in the stacktrace.

Hope the report is useful!

@plexus
Copy link
Member

plexus commented Oct 15, 2018

Seems you ran into a bug. Kaocha has a feature where a test fails if it does not contain any assertions, since that usually means you are missing an (is ...) e.g. this would fail

(deftest foo-test
  (= (foo) :bar))

Looking at the line numbers I think this is what's being triggered, seems it doesn't play nice with --fail-fast. I'll get it fixed in the next release.

@vemv
Copy link
Author

vemv commented Oct 15, 2018

Very nice, yes I think that's the case since (now that I realise), lein test always passes and kaocha --fail-fast never does, in this particular test suite.

@plexus
Copy link
Member

plexus commented Oct 21, 2018

This is fixed on 0.0-211

@plexus plexus closed this as completed Oct 21, 2018
@plexus
Copy link
Member

plexus commented Oct 21, 2018

This is fixed in 0.0-211

@vemv
Copy link
Author

vemv commented Oct 22, 2018

Ace 🍺

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

No branches or pull requests

2 participants