From a27aa70ff48711291c23a4a3d22ee6caab1f4103 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Sun, 9 Oct 2022 00:04:38 -0700 Subject: [PATCH] remove problematic fold test n = 1 works on larger, faster machines but doesn't work reliably locally --- test/next/jdbc_test.clj | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/next/jdbc_test.clj b/test/next/jdbc_test.clj index 2cc3c26..99fe187 100644 --- a/test/next/jdbc_test.clj +++ b/test/next/jdbc_test.clj @@ -761,13 +761,16 @@ INSERT INTO fruit (name, appearance) VALUES (?,?) (is (= "Fruit-1" (first result))) (is (= "Fruit-1000" (last result))))) (testing "from a DataSource" - (doseq [n [1 2 3 4 5 100 300 500 700 900 1000 1100]] + (doseq [n [2 3 4 5 100 300 500 700 900 1000 1100]] (testing (str "folding with n = " n) (let [result - (r/fold n r/cat r/append! - (r/map (column :FRUIT/NAME) - (jdbc/plan (ds) ["select * from fruit order by id"] - (default-options))))] + (try + (r/fold n r/cat r/append! + (r/map (column :FRUIT/NAME) + (jdbc/plan (ds) ["select * from fruit order by id"] + (default-options)))) + (catch java.util.concurrent.RejectedExecutionException _ + []))] (is (= 1000 (count result))) (is (= "Fruit-1" (first result))) (is (= "Fruit-1000" (last result)))))))