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

Fix occasional test failures because a timeout was too short :wrench:

parent bb90acae
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@
(async/chan))
;;; ## ---------------------------------------- EVENT PROCESSING ----------------------------------------
;;; ------------------------------------------------ EVENT PROCESSING ------------------------------------------------
(defn process-sync-database-event
......@@ -41,9 +41,7 @@
(log/warn e (trs "Failed to process sync-database event.") (:topic sync-database-event)))))
;;; ## ---------------------------------------- LIFECYLE ----------------------------------------
;;; ---------------------------------------------------- LIFECYLE ----------------------------------------------------
(defn events-init
"Automatically called during startup; start event listener for database sync events."
......
......@@ -150,6 +150,8 @@
;;; | CHECKING THAT SYNC TASKS RUN CORRECT FNS |
;;; +----------------------------------------------------------------------------------------------------------------+
;; TODO - it would be nice if we could rework this test so we didn't have to wait for so long to see if things
;; happened or not
(defn- check-if-sync-processes-ran-for-db {:style/indent 0} [db-info]
(let [sync-db-metadata-ran? (promise)
analyze-db-ran? (promise)
......@@ -159,9 +161,9 @@
metabase.sync.field-values/update-field-values! (fn [& _] (deliver update-field-values-ran? true))]
(with-scheduler-setup
(tt/with-temp Database [database db-info]
{:ran-sync? (deref sync-db-metadata-ran? 500 false)
:ran-analyze? (deref analyze-db-ran? 100 false)
:ran-update-field-values? (deref update-field-values-ran? 500 false)})))))
{:ran-sync? (deref sync-db-metadata-ran? 1000 false)
:ran-analyze? (deref analyze-db-ran? 200 false)
:ran-update-field-values? (deref update-field-values-ran? 500 false)})))))
(defn- cron-schedule-for-next-year []
(format "0 15 10 * * ? %d" (inc (du/date-extract :year))))
......
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