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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec validation failures break the runner #52

Open
arichiardi opened this issue Jun 27, 2018 · 1 comment
Open

Spec validation failures break the runner #52

arichiardi opened this issue Jun 27, 2018 · 1 comment

Comments

@arichiardi
Copy link

Hello folks/weavejester 馃槃

It seems that spec validations break. I am using eftest.runner from within boot and I see the following when spec does not validate:

Uncaught exception, not in assertion.
expected: nil
  actual: 
clojure.lang.Compiler$CompilerException: java.lang.ClassCastException: eftest.runner$synchronize$fn__2894 cannot be cast to clojure.lang.MultiFn, compiling:(clojure/test/check/clojure_test.cljc:95:1)
           java.lang.ClassCastException: eftest.runner$synchronize$fn__2894 cannot be cast to clojure.lang.MultiFn
                                    clojure.core/get-method                     core.clj: 1809
                  clojure.test.check.clojure-test/eval10462            clojure_test.cljc:   95
                                                        ...                                   
                                       clojure.core/load/fn                     core.clj: 6046
                                          clojure.core/load                     core.clj: 6045
                                          clojure.core/load                     core.clj: 6029
                                                        ...                                   
                                      clojure.core/load-one                     core.clj: 5848
                                   clojure.core/load-lib/fn                     core.clj: 5888
                                      clojure.core/load-lib                     core.clj: 5887
                                      clojure.core/load-lib                     core.clj: 5868
                                                        ...                                   
                                         clojure.core/apply                     core.clj:  659
                                     clojure.core/load-libs                     core.clj: 5925
                                     clojure.core/load-libs                     core.clj: 5909
                                                        ...                                   
                                         clojure.core/apply                     core.clj:  659
                                       clojure.core/require                     core.clj: 5947 (repeats 2 times)
                                                        ...                                   
               clojure.test.check/eval10425/loading--auto--                   check.cljc:   10
                               clojure.test.check/eval10425                   check.cljc:   10
                                                        ...                                   
                                       clojure.core/load/fn                     core.clj: 6046
                                          clojure.core/load                     core.clj: 6045
                                          clojure.core/load                     core.clj: 6029
                                                        ...                                   
                                      clojure.core/load-one                     core.clj: 5848
                                   clojure.core/load-lib/fn                     core.clj: 5888
                                      clojure.core/load-lib                     core.clj: 5887
                                      clojure.core/load-lib                     core.clj: 5868
                                                        ...                                   
                                         clojure.core/apply                     core.clj:  659
                                     clojure.core/load-libs                     core.clj: 5925
                                     clojure.core/load-libs                     core.clj: 5909
                                                        ...                                   
                                         clojure.core/apply                     core.clj:  659
                                       clojure.core/require                     core.clj: 5947 (repeats 2 times)
                                                        ...                                   
                         clojure.spec.gen.alpha/dynaload/fn                    alpha.clj:   22
                            clojure.spec.gen.alpha/dynaload                    alpha.clj:   21
                                  clojure.spec.gen.alpha/fn                    alpha.clj:   29
                                                        ...                                   
                                         clojure.core/deref                     core.clj: 2312
                         clojure.spec.gen.alpha/quick-check                    alpha.clj:   32
                         clojure.spec.gen.alpha/quick-check                    alpha.clj:   30
                                                        ...                                   
                             clojure.spec.alpha/validate-fn                    alpha.clj: 1738
               clojure.spec.alpha/fspec-impl/reify/conform*                    alpha.clj: 1759
                                 clojure.spec.alpha/conform                    alpha.clj:  164
                                      clojure.spec.alpha/dt                    alpha.clj:  760
                                      clojure.spec.alpha/dt                    alpha.clj:  756
                                   clojure.spec.alpha/deriv                    alpha.clj: 1530
                                   clojure.spec.alpha/deriv                    alpha.clj: 1538
                              clojure.spec.alpha/re-conform                    alpha.clj: 1665
          clojure.spec.alpha/regex-spec-impl/reify/conform*                    alpha.clj: 1706
                                 clojure.spec.alpha/conform                    alpha.clj:  164
          clojure.spec.test.alpha/spec-checking-fn/conform!                    alpha.clj:  121
                clojure.spec.test.alpha/spec-checking-fn/fn                    alpha.clj:  140
                                                        ...                                   
                       rest-resources-viz.extractor-test/fn           extractor_test.clj:   36
                                   clojure.test/test-var/fn                     test.clj:  716
                                      clojure.test/test-var                     test.clj:  716
                              eftest.runner/test-vars/fn/fn                   runner.clj:   66
                               clojure.test/default-fixture                     test.clj:  686
                                 eftest.runner/test-vars/fn                   runner.clj:   62
                      eftest.runner/wrap-test-with-timer/fn                   runner.clj:   30
                                 eftest.runner/test-vars/fn                   runner.clj:   76
               rest-resources-viz.extractor-test/wrap-setup           extractor_test.clj:   20
                        clojure.test/compose-fixtures/fn/fn                     test.clj:  693
                               clojure.test/default-fixture                     test.clj:  686
                           clojure.test/compose-fixtures/fn                     test.clj:  693
                                    eftest.runner/test-vars                   runner.clj:   70
                                eftest.runner/test-ns/fn/fn                   runner.clj:   83
                                clojure.core/with-redefs-fn                     core.clj: 7434
                                   eftest.runner/test-ns/fn                   runner.clj:   83
                                      eftest.runner/test-ns                   runner.clj:   83
                                  eftest.runner/test-all/fn                   runner.clj:   90
                                        clojure.core/map/fn                     core.clj: 2747
                                                        ...                                   
                                         clojure.core/apply                     core.clj:  659
                                     eftest.runner/test-all                   runner.clj:   91
                                    eftest.runner/run-tests                   runner.clj:  148
                   metosin.bat-test.impl/reload-and-test/fn                     impl.clj:  161
                  metosin.bat-test.impl/maybe-run-cloverage                     impl.clj:  125
                      metosin.bat-test.impl/reload-and-test                     impl.clj:  159
                                  metosin.bat-test.impl/run                     impl.clj:  200
                                                        ...                                   
                                         clojure.core/apply                     core.clj:  657
                                      boot.pod/eval-fn-call                      pod.clj:  359
                                          boot.pod/call-in*                      pod.clj:  410
                                                        ...                                   
org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke  ClojureRuntimeShimImpl.java:  109
org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.invoke  ClojureRuntimeShimImpl.java:  102
                                                        ...                                   
                                          boot.pod/call-in*                      pod.clj:  413
                         metosin.bat-test/eval1541/fn/fn/fn                 bat_test.clj:   52
                       boot.task.built-in/fn/fn/fn/fn/fn/fn                 built_in.clj:  442
                          boot.task.built-in/fn/fn/fn/fn/fn                 built_in.clj:  442
                             boot.task.built-in/fn/fn/fn/fn                 built_in.clj:  439
                                        boot.core/run-tasks                     core.clj: 1021
                                          boot.core/boot/fn                     core.clj: 1031
                        clojure.core/binding-conveyor-fn/fn                     core.clj: 2022
                                                        ...                                   
                        java.util.concurrent.FutureTask.run              FutureTask.java:  266
          java.util.concurrent.ThreadPoolExecutor.runWorker      ThreadPoolExecutor.java: 1149
         java.util.concurrent.ThreadPoolExecutor$Worker.run      ThreadPoolExecutor.java:  624
                                       java.lang.Thread.run                  Thread.java:  748


2/2   100% [==================================================]  ETA: 00:00

All good in vanilla boot.test where I can see the failure properly. Of course eftest feels like a faster/better testing tool so I will try to investigate more.

@Deraen
Copy link
Contributor

Deraen commented Jun 27, 2018

Missing ex-data is probably because Boot/Bat-test running eftest inside a pod. No easy solution, because exceptions can't be thrown from pod back to boot main context, boot-cljs does some magic to serialize, deserialize and rethrow exceptions but that has lots of problems also. Anyway, this is probably not problem in eftest core.

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