From 250263251888b486f2876822b84e92dcf44fa474 Mon Sep 17 00:00:00 2001 From: John Shaffer Date: Fri, 19 Aug 2022 19:23:15 -0500 Subject: [PATCH] Fix run-test-parallel The previous code references fixtures/f-tests, but there is no such directory. The test case looks unfinished, so I'm not sure that there ever was a working f-tests dir. To fix the test case, I have adapted the code from run-test, just before run-test-parallel. --- test/unit/kaocha/type/ns_test.clj | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/test/unit/kaocha/type/ns_test.clj b/test/unit/kaocha/type/ns_test.clj index 5000f29a..a016e8a9 100644 --- a/test/unit/kaocha/type/ns_test.clj +++ b/test/unit/kaocha/type/ns_test.clj @@ -69,15 +69,12 @@ (testable/run testable testable))))))) (deftest run-test-parallel - (classpath/add-classpath "fixtures/f-tests") - - (let [testable (testable/load {:kaocha.testable/type :kaocha.type/clojure.test - :kaocha.testable/id :unit - :kaocha/ns-patterns ["-test$"] - :kaocha/source-paths ["src"] - :kaocha/test-paths ["fixtures/f-tests"] - :kaocha.filter/skip-meta [:kaocha/skip]})] + (classpath/add-classpath "fixtures/a-tests") + (let [testable (testable/load {:kaocha.testable/type :kaocha.type/ns + :kaocha.testable/id :foo.bar-test + :kaocha.testable/desc "foo.bar-test" + :kaocha.ns/name 'foo.bar-test})] (is (match? {:kaocha.testable/type :kaocha.type/ns :kaocha.testable/id :foo.bar-test :kaocha.ns/name 'foo.bar-test @@ -94,10 +91,10 @@ :kaocha.result/pending 0 :kaocha.result/fail 0}]} (:result - (with-test-ctx {:fail-fast? true} + (with-test-ctx {:fail-fast? true :parallel true} (testable/run testable testable))))) (is (not (nil? (:result - (binding [testable/*config* (assoc testable/*config* :parallel true)] - (with-test-ctx {:fail-fast? true - :parallel true} - (testable/run testable testable))))))))) + (binding [testable/*config* (assoc testable/*config* :parallel true)] + (with-test-ctx {:fail-fast? true + :parallel true} + (testable/run testable testable)))))))))