From 375c85bcc0699bcd26ffac95ab6fb5ea7e354a7d Mon Sep 17 00:00:00 2001 From: Bobby Iliev Date: Fri, 20 Dec 2024 15:22:55 +0200 Subject: [PATCH] Update excluded tests list --- scripts/exclude_tests.diff | 116 ++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/scripts/exclude_tests.diff b/scripts/exclude_tests.diff index 5595ca8..e26dddd 100644 --- a/scripts/exclude_tests.diff +++ b/scripts/exclude_tests.diff @@ -1,27 +1,27 @@ diff --git a/test/metabase/db/metadata_queries_test.clj b/test/metabase/db/metadata_queries_test.clj -index 7373655654..25eb5da352 100644 +index 0c630c93a3..a0635ac0ac 100644 --- a/test/metabase/db/metadata_queries_test.clj +++ b/test/metabase/db/metadata_queries_test.clj -@@ -45,13 +45,7 @@ +@@ -54,13 +54,7 @@ (sort-by first) - (take 5))] + (take 5)))] (is (= :type/Text (-> fields first :base_type))) -- (is (= expected (fetch! nil))) +- (is (= expected (fetch nil))) - (testing "truncates text fields (see #13288)" - (doseq [size [1 4 80]] - (is (= (mapv (fn [[s]] [(subs (or s "") 0 (min size (count s)))]) - expected) -- (fetch! size)) -- "Did not truncate a text field"))))) +- (fetch size)) +- "Did not truncate a text field")))))) + (is (= expected (fetch! nil))))) + (deftest table-rows-sample-substring-test (testing "substring checking" - (with-redefs [driver.u/database->driver (constantly (:engine (mt/db))) diff --git a/test/metabase/driver_test.clj b/test/metabase/driver_test.clj -index a506be0a66..cf358e20b2 100644 +index 823944f5a9..b7787a0505 100644 --- a/test/metabase/driver_test.clj +++ b/test/metabase/driver_test.clj -@@ -106,7 +106,7 @@ +@@ -107,7 +107,7 @@ (do (tx/destroy-db! driver/*driver* dbdef) details))] @@ -30,7 +30,7 @@ index a506be0a66..cf358e20b2 100644 (binding [h2/*allow-testing-h2-connections* true] (driver/can-connect? driver/*driver* details)) (catch Exception _ -@@ -144,7 +144,7 @@ +@@ -146,7 +146,7 @@ ;; so fake it by changing the database details (let [details (:details (mt/db)) new-details (case driver/*driver* @@ -39,7 +39,7 @@ index a506be0a66..cf358e20b2 100644 :oracle (assoc details :service-name (mt/random-name)) :presto-jdbc (assoc details :catalog (mt/random-name)))] (t2/update! :model/Database (u/the-id db) {:details new-details})) -@@ -152,9 +152,9 @@ +@@ -154,9 +154,9 @@ (tx/destroy-db! driver/*driver* dbdef)) (testing "after deleting a database, sync should fail" (testing "1: sync-and-analyze-database! should log a warning and fail early" @@ -52,47 +52,48 @@ index a506be0a66..cf358e20b2 100644 (t2/delete! :model/Database (u/the-id db)))))))) diff --git a/test/metabase/query_processor_test/date_bucketing_test.clj b/test/metabase/query_processor_test/date_bucketing_test.clj -index 6e469bb152..f5f817715b 100644 +index f8d56f350d..c2bcd92be5 100644 --- a/test/metabase/query_processor_test/date_bucketing_test.clj +++ b/test/metabase/query_processor_test/date_bucketing_test.clj -@@ -184,7 +184,7 @@ - - ;; There's a bug here where we are reading in the UTC time as pacific, so we're 7 hours off - ;; (This is fixed for Oracle now) -- (and (qp.test-util/tz-shifted-driver-bug? driver/*driver*) (not= driver/*driver* :oracle)) -+ (and (qp.test-util/tz-shifted-driver-bug? driver/*driver*) (not= driver/*driver* :oracle) (not= driver/*driver* :materialize)) - [["2015-06-01T10:31:00-07:00" 1] - ["2015-06-01T16:06:00-07:00" 1] - ["2015-06-01T17:23:00-07:00" 1] -@@ -242,7 +242,7 @@ - ["2015-06-02 08:20:00" 1] - ["2015-06-02 11:11:00" 1]] - -- (and (qp.test-util/tz-shifted-driver-bug? driver/*driver*) (not= driver/*driver* :oracle)) -+ (and (qp.test-util/tz-shifted-driver-bug? driver/*driver*) (not= driver/*driver* :oracle) (not= driver/*driver* :materialize)) - [["2015-06-01T10:31:00-04:00" 1] - ["2015-06-01T16:06:00-04:00" 1] - ["2015-06-01T17:23:00-04:00" 1] +@@ -196,6 +196,7 @@ + ;; There's a bug here where we are reading in the UTC time as pacific, so we're 7 hours off + ;; (This is fixed for Oracle now) + (and (qp.test-util/tz-shifted-driver-bug? driver) (not= driver :oracle)) ++ (and (qp.test-util/tz-shifted-driver-bug? driver) (not= driver :oracle) (not= driver :materialize)) + [["2015-06-01T10:31:00-07:00" 1] + ["2015-06-01T16:06:00-07:00" 1] + ["2015-06-01T17:23:00-07:00" 1] +@@ -268,6 +269,7 @@ + [driver] + (cond + (and (qp.test-util/tz-shifted-driver-bug? driver) (not= driver :oracle)) ++ (and (qp.test-util/tz-shifted-driver-bug? driver) (not= driver :oracle) (not= driver :materialize)) + [["2015-06-01T10:31:00-04:00" 1] + ["2015-06-01T16:06:00-04:00" 1] + ["2015-06-01T17:23:00-04:00" 1] diff --git a/test/metabase/query_processor_test/explicit_joins_test.clj b/test/metabase/query_processor_test/explicit_joins_test.clj -index ded26c8e97..4608b25854 100644 +index 507902de93..55c3fbc5c6 100644 --- a/test/metabase/query_processor_test/explicit_joins_test.clj +++ b/test/metabase/query_processor_test/explicit_joins_test.clj -@@ -270,8 +270,8 @@ +@@ -277,11 +277,11 @@ + [_driver _feature _database] + true) + +-;;; mongodb doesn't support foreign keys required by some tests below. ++;;; mongodb and materialize do't support foreign keys required by some tests below. + ;;; + ;;; TODO -- not sure what exactly this means. Maybe it was talking about marking FKs automatically during sync? Since we + ;;; now do that manually for DBs like MongoDB maybe we can enable these tests for Mongo. +-(defmethod driver/database-supports? [:mongo ::foreign-keys-as-required-by-tests] ++(defmethod driver/database-supports? [:materialize ::foreign-keys-as-required-by-tests] + [_driver _feature _database] + false) - (deftest ^:parallel select-*-source-query-test - (mt/test-drivers (disj (mt/normal-drivers-with-feature :left-join) -- ;; mongodb doesn't support foreign keys required by this test -- :mongo) -+ ;; mongodb and materialize don't support foreign keys required by this test -+ :mongo :materialize) - (testing "We should be able to run a query that for whatever reason ends up with a `SELECT *` for the source query" - (let [{:keys [rows columns]} (mt/format-rows-by [int int] - (mt/rows+column-names diff --git a/test/metabase/test/data/dataset_definition_test.clj b/test/metabase/test/data/dataset_definition_test.clj -index 25ead15772..f830d1c2ff 100644 +index b5bd814af2..6b4539c7f9 100644 --- a/test/metabase/test/data/dataset_definition_test.clj +++ b/test/metabase/test/data/dataset_definition_test.clj -@@ -8,52 +8,8 @@ +@@ -7,51 +7,8 @@ [metabase.timeseries-query-processor-test.util :as tqpt] [toucan2.core :as t2])) @@ -102,12 +103,12 @@ index 25ead15772..f830d1c2ff 100644 - ;; Timeseries drivers currently support only testing with pre-loaded dataset - (remove (tqpt/timeseries-drivers))) - (mt/dataset (mt/dataset-definition "custom-pk" -- ["user" -- [{:field-name "custom_id" :base-type :type/Integer :pk? true}] -- [[1]]] -- ["group" -- [{:field-name "user_custom_id" :base-type :type/Integer :fk "user"}] -- [[1]]]) +- ["user" +- [{:field-name "custom_id" :base-type :type/Integer :pk? true}] +- [[1]]] +- ["group" +- [{:field-name "user_custom_id" :base-type :type/Integer :fk "user"}] +- [[1]]]) - (let [user-fields (t2/select [:model/Field :name :semantic_type :fk_target_field_id] :table_id (mt/id :user)) - group-fields (t2/select [:model/Field :name :semantic_type :fk_target_field_id] :table_id (mt/id :group)) - format-name #(ddl.i/format-name driver/*driver* %)] @@ -116,15 +117,14 @@ index 25ead15772..f830d1c2ff 100644 - :fk_target_field_id nil - :semantic_type :type/PK}] - user-fields))) -- (when (driver.u/supports? driver/*driver* :foreign-keys (mt/db)) -- (testing "user_custom_id is a FK non user.custom_id" -- (is (= #{{:name (format-name "user_custom_id") -- :fk_target_field_id (mt/id :user :custom_id) -- :semantic_type :type/FK} -- {:name (format-name "id") -- :fk_target_field_id nil -- :semantic_type :type/PK}} -- (set group-fields))))))))) +- (testing "user_custom_id is a FK non user.custom_id" +- (is (= #{{:name (format-name "user_custom_id") +- :fk_target_field_id (mt/id :user :custom_id) +- :semantic_type :type/FK} +- {:name (format-name "id") +- :fk_target_field_id nil +- :semantic_type :type/PK}} +- (set group-fields)))))))) - (mt/defdataset composite-pk [["songs"