Skip to content

Commit

Permalink
timeouts in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dwwoelfel committed Dec 23, 2024
1 parent da7a771 commit 2c4ba19
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions server/test/instant/reactive/store_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
q))]
@started
(future-cancel f1)
(is (instance? java.lang.InterruptedException @err))))
(is (instance? java.lang.InterruptedException (deref err 100 :timeout)))))

Check failure on line 75 in server/test/instant/reactive/store_test.clj

View workflow job for this annotation

GitHub Actions / clj-check

Test failure

Check failure on line 75 in server/test/instant/reactive/store_test.clj

View workflow job for this annotation

GitHub Actions / clj-check

Test failure

(dotimes [x 100]
(testing "work isn't canceled if there are still listeners"
Expand All @@ -98,12 +98,11 @@
nil
q))]
(future-cancel f1)
(is (or (instance? java.lang.InterruptedException @err)
(instance? java.util.concurrent.CancellationException @err)))
(is (or (instance? java.lang.InterruptedException (deref err 100 :timeout))
(instance? java.util.concurrent.CancellationException (deref err 100 :timeout))))
(Thread/sleep 10)
(deliver wait :a)
(is (= @f2 :a))
@wait)))
(is (= (deref f2 100 :timeout) :a)))))

(testing "propagates failures"
(let [q [[:ea (random-uuid)]]
Expand Down

0 comments on commit 2c4ba19

Please sign in to comment.