Skip to content
Snippets Groups Projects
Unverified Commit 407f0650 authored by Cam Saul's avatar Cam Saul
Browse files

Test fix :wrench:

parent 473910ee
No related merge requests found
......@@ -36,7 +36,9 @@
(update-in [:data "db-id"] replace-trailing-id-with-<id>))))))))))
(defn- current-tasks []
(replace-ids-with-<id> (tu/scheduler-current-tasks)))
(->> (tu/scheduler-current-tasks)
(filter #(#{"metabase.task.sync-and-analyze.job" "metabase.task.update-field-values.job"} (:key %)))
replace-ids-with-<id>))
(defmacro ^:private with-scheduler-setup [& body]
`(tu/with-temp-scheduler
......
......@@ -37,12 +37,11 @@
(cron/with-misfire-handling-instruction-ignore-misfires)))))
(defn- do-with-temp-scheduler-and-cleanup [f]
(try
(tu/with-temp-scheduler
(f))
(finally
(task/delete-task! (.getKey (job)) (.getKey (trigger-1)))
(task/delete-task! (.getKey (job)) (.getKey (trigger-2))))))
(tu/with-temp-scheduler
(try
(f)
(finally
(task/delete-task! (.getKey (job)) (.getKey (trigger-1)))))))
(defmacro ^:private with-temp-scheduler-and-cleanup [& body]
`(do-with-temp-scheduler-and-cleanup (fn [] ~@body)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment