From 326f43ce316bed9a8d5755eb328d4735894616da Mon Sep 17 00:00:00 2001
From: Simon Belak <simon.belak@gmail.com>
Date: Wed, 6 Dec 2017 17:26:18 +0100
Subject: [PATCH] Check for cancelation

---
 test/metabase/test/async.clj | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/test/metabase/test/async.clj b/test/metabase/test/async.clj
index f34b1f628c9..fe3e368bd38 100644
--- a/test/metabase/test/async.clj
+++ b/test/metabase/test/async.clj
@@ -33,8 +33,7 @@
   "Blocking version of async/result."
   [job-id]
   (while-with-timeout (not (and (@job-done? job-id)
-                                (-> job-id
-                                    ComputationJob
-                                    async/result
-                                    (find :result)))))
+                                (let [job (ComputationJob job-id)]
+                                  (or (:result (async/result job))
+                                      (async/canceled? job))))))
   (async/result (ComputationJob job-id)))
-- 
GitLab