From 2c4ba1957637687f0dd9e69afd6945369e042ac3 Mon Sep 17 00:00:00 2001 From: Daniel Woelfel Date: Mon, 23 Dec 2024 09:08:50 -0600 Subject: [PATCH] timeouts in tests --- server/test/instant/reactive/store_test.clj | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/test/instant/reactive/store_test.clj b/server/test/instant/reactive/store_test.clj index 651bed992..bfbc67b50 100644 --- a/server/test/instant/reactive/store_test.clj +++ b/server/test/instant/reactive/store_test.clj @@ -72,7 +72,7 @@ q))] @started (future-cancel f1) - (is (instance? java.lang.InterruptedException @err)))) + (is (instance? java.lang.InterruptedException (deref err 100 :timeout))))) (dotimes [x 100] (testing "work isn't canceled if there are still listeners" @@ -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)]]