Permalink
Browse files

neuter non-deterministic tests, see http://build.clojure.org/job/cloj…

  • Loading branch information...
1 parent f577e31 commit 51f9bbe4b94b3871b760689645818f22054a3a8d @stuarthalloway stuarthalloway committed Feb 8, 2013
Showing with 7 additions and 4 deletions.
  1. +7 −4 test/clojure/test_clojure/agents.clj
@@ -49,7 +49,10 @@
(is (= agt (first @err)))
(is (true? (instance? ArithmeticException (second @err))))))
-(deftest fail-handler
+
+;; TODO: make these tests deterministic (i.e. not sleep and hope)
+
+#_(deftest fail-handler
(let [err (atom nil)
agt (agent 0 :error-mode :fail :error-handler #(reset! err %&))]
(send agt /)
@@ -79,7 +82,7 @@
(send failing-agent (fn [_] (throw (RuntimeException.))))
(is (.await latch 10 TimeUnit/SECONDS))))
-(deftest restart-no-clear
+#_(deftest restart-no-clear
(let [p (promise)
agt (agent 1 :error-mode :fail)]
(send agt (fn [v] @p))
@@ -95,7 +98,7 @@
(is (= 12 @agt))
(is (nil? (agent-error agt)))))
-(deftest restart-clear
+#_(deftest restart-clear
(let [p (promise)
agt (agent 1 :error-mode :fail)]
(send agt (fn [v] @p))
@@ -115,7 +118,7 @@
(is (= 11 @agt))
(is (nil? (agent-error agt)))))
-(deftest invalid-restart
+#_(deftest invalid-restart
(let [p (promise)
agt (agent 2 :error-mode :fail :validator even?)]
(is (thrown? RuntimeException (restart-agent agt 4)))

0 comments on commit 51f9bbe

Please sign in to comment.