From e53ee5eea35109810854e312735c61c40138911c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cam=20Sau=CC=88l?= <cammsaul@gmail.com> Date: Thu, 24 Mar 2016 12:54:29 -0700 Subject: [PATCH] Reduce intermittent CI failure rate --- src/metabase/driver/mongo/util.clj | 2 +- test/metabase/test/data/bigquery.clj | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/metabase/driver/mongo/util.clj b/src/metabase/driver/mongo/util.clj index 0999dfeec20..0c4efb106d9 100644 --- a/src/metabase/driver/mongo/util.clj +++ b/src/metabase/driver/mongo/util.clj @@ -14,7 +14,7 @@ Don't set the timeout too low -- I've have Circle fail when the timeout was 1000ms on *one* occasion." - 1500) + 3000) (def ^:dynamic ^com.mongodb.DB *mongo-connection* "Connection to a Mongo database. diff --git a/test/metabase/test/data/bigquery.clj b/test/metabase/test/data/bigquery.clj index e1d2e6e2e1c..8b45a1db180 100644 --- a/test/metabase/test/data/bigquery.clj +++ b/test/metabase/test/data/bigquery.clj @@ -115,9 +115,9 @@ (.set data (name k) v)) (doto (TableDataInsertAllRequest$Rows.) (.setJson data)))))))) - ;; Wait up to 15 seconds for all the rows to be loaded and become available by BigQuery + ;; Wait up to 30 seconds for all the rows to be loaded and become available by BigQuery (let [expected-row-count (count row-maps)] - (loop [seconds-to-wait-for-load 15] + (loop [seconds-to-wait-for-load 30] (let [actual-row-count (table-row-count dataset-id table-id)] (cond (= expected-row-count actual-row-count) :ok @@ -182,13 +182,10 @@ (try (destroy-dataset! database-name) (catch Throwable _)) (create-dataset! database-name) - (u/pdoseq [tabledef table-definitions] + (doseq [tabledef table-definitions] (load-tabledef! database-name tabledef))) (println (u/format-color 'green "[OK]"))) -(defn- destroy-db! [{:keys [database-name]}] - #_(destroy-dataset! (normalize-name database-name))) - ;;; # ------------------------------------------------------------ IDatasetLoader ------------------------------------------------------------ @@ -198,4 +195,4 @@ {:engine (constantly :bigquery) :database->connection-details (u/drop-first-arg database->connection-details) :create-db! (u/drop-first-arg create-db!) - :destroy-db! (u/drop-first-arg destroy-db!)})) + :destroy-db! (constantly nil)})) -- GitLab