Created
June 1, 2018 00:58
-
-
Save noisesmith/8b0868a588086a21d80a0b7e96438619 to your computer and use it in GitHub Desktop.
weird circleci bug with assertion errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user=> (ns foo.broken) | |
nil | |
foo.broken=> (require 'circleci.test 'clojure.test) | |
nil | |
foo.broken=> (defn foo [] {:pre [false]} true) | |
#'foo.broken/foo | |
foo.broken=> (clojure.test/deftest foo-test (foo)) | |
#'foo.broken/foo-test | |
foo.broken=> (circleci.test/run-tests 'foo.broken) | |
test-results-dir: target/test-results | |
Testing foo.broken | |
AssertionError Assert failed: false foo.broken/foo (cdd1b2124923744c225124744f2e0f4299a65d0b-init.clj:1) | |
foo.broken=> (slurp "target/test-results/foo.broken.xml") | |
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><testsuite name=\"foo.broken\" errors=\"0\" tests=\"1\" failures=\"0\" elapsed=\"5.17504E-4\"><testcase name=\"foo-test\" time=\"5.17504E-4\"></testcase></testsuite>" | |
foo.broken=> (defn foo [] (throw (ex-info "broken" {})) true) | |
#'foo.broken/foo | |
foo.broken=> (circleci.test/run-tests 'foo.broken) | |
test-results-dir: target/test-results | |
Testing foo.broken | |
ERROR in foo.broken/ (foo-test) (core.clj:4739) | |
Uncaught exception, not in assertion. | |
expected: nil | |
actual: clojure.lang.ExceptionInfo: broken | |
at clojure.core$ex_info.invokeStatic (core.clj:4739) | |
clojure.core$ex_info.invoke (core.clj:4739) | |
foo.broken$foo.invokeStatic (cdd1b2124923744c225124744f2e0f4299a65d0b-init.clj:1) | |
foo.broken$foo.invoke (cdd1b2124923744c225124744f2e0f4299a65d0b-init.clj:1) | |
foo.broken$fn__27277.invokeStatic (cdd1b2124923744c225124744f2e0f4299a65d0b-init.clj:1) | |
foo.broken/fn (cdd1b2124923744c225124744f2e0f4299a65d0b-init.clj:1) | |
circleci.test$test_STAR_.invokeStatic (test.clj:74) | |
circleci.test$test_STAR_.invoke (test.clj:70) | |
circleci.test$test_var_STAR_$fn__2051$fn__2052$fn__2053.invoke (test.clj:91) | |
clojure.test$default_fixture.invokeStatic (test.clj:686) | |
clojure.test$default_fixture.invoke (test.clj:682) | |
circleci.test$test_var_STAR_$fn__2051$fn__2052.invoke (test.clj:91) | |
circleci.test$once_fixtures$fn__2019$fn__2020$fn__2021.invoke (test.clj:47) | |
circleci.test$once_fixtures$fn__2019.invoke (test.clj:48) | |
circleci.test$test_var_STAR_$fn__2051.invoke (test.clj:89) | |
circleci.test$make_global_fixture$fn__2028.invoke (test.clj:55) | |
circleci.test$test_var_STAR_.invokeStatic (test.clj:87) | |
circleci.test$test_var_STAR_.invoke (test.clj:76) | |
circleci.test$test_var.invokeStatic (test.clj:119) | |
circleci.test$test_var.invoke (test.clj:103) | |
circleci.test$test_all_vars.invokeStatic (test.clj:129) | |
circleci.test$test_all_vars.invoke (test.clj:127) | |
circleci.test$test_ns$fn__2085$fn__2086$fn__2087.invoke (test.clj:164) | |
clojure.test$default_fixture.invokeStatic (test.clj:686) | |
clojure.test$default_fixture.invoke (test.clj:682) | |
circleci.test$once_fixtures$fn__2019.invoke (test.clj:48) | |
circleci.test$test_ns$fn__2085$fn__2086.invoke (test.clj:156) | |
circleci.test$make_global_fixture$fn__2028.invoke (test.clj:55) | |
circleci.test$test_ns$fn__2085.invoke (test.clj:154) | |
circleci.test$test_ns.invokeStatic (test.clj:153) | |
circleci.test$test_ns.invoke (test.clj:131) | |
circleci.test$run_selected_tests$fn__2095$iter__2096__2100$fn__2101.invoke (test.clj:190) | |
clojure.lang.LazySeq.sval (LazySeq.java:40) | |
clojure.lang.LazySeq.seq (LazySeq.java:49) | |
clojure.lang.Cons.next (Cons.java:39) | |
clojure.lang.RT.boundedLength (RT.java:1785) | |
clojure.lang.RestFn.applyTo (RestFn.java:130) | |
clojure.core$apply.invokeStatic (core.clj:659) | |
clojure.core$apply.invoke (core.clj:652) | |
circleci.test$run_selected_tests$fn__2095.invoke (test.clj:189) | |
circleci.test$make_global_fixture$fn__2028.invoke (test.clj:55) | |
circleci.test$run_selected_tests.invokeStatic (test.clj:188) | |
circleci.test$run_selected_tests.invoke (test.clj:180) | |
circleci.test$run_selected_tests.invokeStatic (test.clj:185) | |
circleci.test$run_selected_tests.invoke (test.clj:180) | |
circleci.test$run_tests.invokeStatic (test.clj:200) | |
circleci.test$run_tests.doInvoke (test.clj:195) | |
clojure.lang.RestFn.invoke (RestFn.java:408) | |
foo.broken$eval27361.invokeStatic (cdd1b2124923744c225124744f2e0f4299a65d0b-init.clj:1) | |
foo.broken$eval27361.invoke (cdd1b2124923744c225124744f2e0f4299a65d0b-init.clj:1) | |
clojure.lang.Compiler.eval (Compiler.java:7062) | |
clojure.lang.Compiler.eval (Compiler.java:7025) | |
clojure.core$eval.invokeStatic (core.clj:3206) | |
clojure.core$eval.invoke (core.clj:3202) | |
clojure.main$repl$read_eval_print__8572$fn__8575.invoke (main.clj:243) | |
clojure.main$repl$read_eval_print__8572.invoke (main.clj:243) | |
clojure.main$repl$fn__8581.invoke (main.clj:261) | |
clojure.main$repl.invokeStatic (main.clj:261) | |
clojure.main$repl.doInvoke (main.clj:177) | |
clojure.lang.RestFn.invoke (RestFn.java:1523) | |
clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__1120.invoke (interruptible_eval.clj:87) | |
clojure.lang.AFn.applyToHelper (AFn.java:152) | |
clojure.lang.AFn.applyTo (AFn.java:144) | |
clojure.core$apply.invokeStatic (core.clj:657) | |
clojure.core$with_bindings_STAR_.invokeStatic (core.clj:1965) | |
clojure.core$with_bindings_STAR_.doInvoke (core.clj:1965) | |
clojure.lang.RestFn.invoke (RestFn.java:425) | |
clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invokeStatic (interruptible_eval.clj:85) | |
clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke (interruptible_eval.clj:55) | |
clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__1165$fn__1168.invoke (interruptible_eval.clj:222) | |
clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__1160.invoke (interruptible_eval.clj:190) | |
clojure.lang.AFn.run (AFn.java:22) | |
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149) | |
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624) | |
java.lang.Thread.run (Thread.java:748) | |
Ran 1 tests containing 1 assertions. | |
0 failures, 1 errors. | |
{:test 1, :pass 0, :fail 0, :error 1, :type :summary} | |
foo.broken=> (slurp "target/test-results/foo.broken.xml") | |
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><testsuite name=\"foo.broken\" errors=\"1\" tests=\"1\" failures=\"0\" elapsed=\"0.011948464\"><testcase name=\"foo-test\" time=\"0.011948464\"><error type=\"class clojure.lang.ExceptionInfo\" message=\"broken\">clojure.lang.ExceptionInfo: broken {}\n\tat clojure.core$ex_info.invokeStatic(core.clj:4739)\n\tat clojure.core$ex_info.invoke(core.clj:4739)\n\tat foo.broken$foo.invokeStatic(cdd1b2124923744c225124744f2e0f4299a65d0b-init.clj:1)\n\tat foo.broken$foo.invoke(cdd1b2124923744c225124744f2e0f4299a65d0b-init.clj:1)\n\tat foo.broken$fn__27277.invokeStatic(cdd1b2124923744c225124744f2e0f4299a65d0b-init.clj:1)\n\tat foo.broken$fn__27277.invoke(cdd1b2124923744c225124744f2e0f4299a65d0b-init.clj:1)\n\tat circleci.test$test_STAR_.invokeStatic(test.clj:74)\n\tat circleci.test$test_STAR_.invoke(test.clj:70)\n\tat circleci.test$test_var_STAR_$fn__2051$fn__2052$fn__2053.invoke(test.clj:91)\n\tat clojure.test$default_fixture.invokeStatic(test.clj:686)\n\tat clojure.test$default_fixture.invoke(test.clj:682)\n\tat circleci.test$test_var_STAR_$fn__2051$fn__2052.invoke(test.clj:91)\n\tat circleci.test$once_fixtures$fn__2019$fn__2020$fn__2021.invoke(test.clj:47)\n\tat circleci.test$once_fixtures$fn__2019.invoke(test.clj:48)\n\tat circleci.test$test_var_STAR_$fn__2051.invoke(test.clj:89)\n\tat circleci.test$make_global_fixture$fn__2028.invoke(test.clj:55)\n\tat circleci.test$test_var_STAR_.invokeStatic(test.clj:87)\n\tat circleci.test$test_var_STAR_.invoke(test.clj:76)\n\tat circleci.test$test_var.invokeStatic(test.clj:119)\n\tat circleci.test$test_var.invoke(test.clj:103)\n\tat circleci.test$test_all_vars.invokeStatic(test.clj:129)\n\tat circleci.test$test_all_vars.invoke(test.clj:127)\n\tat circleci.test$test_ns$fn__2085$fn__2086$fn__2087.invoke(test.clj:164)\n\tat clojure.test$default_fixture.invokeStatic(test.clj:686)\n\tat clojure.test$default_fixture.invoke(test.clj:682)\n\tat circleci.test$once_fixtures$fn__2019.invoke(test.clj:48)\n\tat circleci.test$test_ns$fn__2085$fn__2086.invoke(test.clj:156)\n\tat circleci.test$make_global_fixture$fn__2028.invoke(test.clj:55)\n\tat circleci.test$test_ns$fn__2085.invoke(test.clj:154)\n\tat circleci.test$test_ns.invokeStatic(test.clj:153)\n\tat circleci.test$test_ns.invoke(test.clj:131)\n\tat circleci.test$run_selected_tests$fn__2095$iter__2096__2100$fn__2101.invoke(test.clj:190)\n\tat clojure.lang.LazySeq.sval(LazySeq.java:40)\n\tat clojure.lang.LazySeq.seq(LazySeq.java:49)\n\tat clojure.lang.Cons.next(Cons.java:39)\n\tat clojure.lang.RT.boundedLength(RT.java:1785)\n\tat clojure.lang.RestFn.applyTo(RestFn.java:130)\n\tat clojure.core$apply.invokeStatic(core.clj:659)\n\tat clojure.core$apply.invoke(core.clj:652)\n\tat circleci.test$run_selected_tests$fn__2095.invoke(test.clj:189)\n\tat circleci.test$make_global_fixture$fn__2028.invoke(test.clj:55)\n\tat circleci.test$run_selected_tests.invokeStatic(test.clj:188)\n\tat circleci.test$run_selected_tests.invoke(test.clj:180)\n\tat circleci.test$run_selected_tests.invokeStatic(test.clj:185)\n\tat circleci.test$run_selected_tests.invoke(test.clj:180)\n\tat circleci.test$run_tests.invokeStatic(test.clj:200)\n\tat circleci.test$run_tests.doInvoke(test.clj:195)\n\tat clojure.lang.RestFn.invoke(RestFn.java:408)\n\tat foo.broken$eval27361.invokeStatic(cdd1b2124923744c225124744f2e0f4299a65d0b-init.clj:1)\n\tat foo.broken$eval27361.invoke(cdd1b2124923744c225124744f2e0f4299a65d0b-init.clj:1)\n\tat clojure.lang.Compiler.eval(Compiler.java:7062)\n\tat clojure.lang.Compiler.eval(Compiler.java:7025)\n\tat clojure.core$eval.invokeStatic(core.clj:3206)\n\tat clojure.core$eval.invoke(core.clj:3202)\n\tat clojure.main$repl$read_eval_print__8572$fn__8575.invoke(main.clj:243)\n\tat clojure.main$repl$read_eval_print__8572.invoke(main.clj:243)\n\tat clojure.main$repl$fn__8581.invoke(main.clj:261)\n\tat clojure.main$repl.invokeStatic(main.clj:261)\n\tat clojure.main$repl.doInvoke(main.clj:177)\n\tat clojure.lang.RestFn.invoke(RestFn.java:1523)\n\tat clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__1120.invoke(interruptible_eval.clj:87)\n\tat clojure.lang.AFn.applyToHelper(AFn.java:152)\n\tat clojure.lang.AFn.applyTo(AFn.java:144)\n\tat clojure.core$apply.invokeStatic(core.clj:657)\n\tat clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1965)\n\tat clojure.core$with_bindings_STAR_.doInvoke(core.clj:1965)\n\tat clojure.lang.RestFn.invoke(RestFn.java:425)\n\tat clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invokeStatic(interruptible_eval.clj:85)\n\tat clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:55)\n\tat clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__1165$fn__1168.invoke(interruptible_eval.clj:222)\n\tat clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__1160.invoke(interruptible_eval.clj:190)\n\tat clojure.lang.AFn.run(AFn.java:22)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n</error></testcase></testsuite>" | |
foo.broken=> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment