Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix failing timestamp / timezone tests #9

Closed
kaklakariada opened this issue Dec 22, 2021 · 2 comments · Fixed by #29
Closed

Fix failing timestamp / timezone tests #9

kaklakariada opened this issue Dec 22, 2021 · 2 comments · Fixed by #29
Labels
bug Something isn't working

Comments

@kaklakariada
Copy link
Collaborator

kaklakariada commented Dec 22, 2021

metabase.driver.sql.parameters.substitute-test

FAIL in metabase.driver.sql.parameters.substitute-test/e2e-parse-native-dates-test (substitute_test.clj:618)

:exasol
Native dates should be parsed with the report timezone
expected: ["2018-04-18T00:00:00-07:00"]
  actual: (["2018-04-17T00:00:00-07:00"])

metabase.query-processor-test.alternative-date-test

See https://github.com/exasol/metabase-driver/runs/4800583820?check_suite_focus=true

FAIL in metabase.query-processor-test.alternative-date-test/microseconds-test (alternative_date_test.clj:38)

:exasol
expected: #{[1 4 "2015-06-06T10:40:00Z"] [2 0 "2015-06-10T19:51:00Z"]}
  actual: (#{[1 4 "2015-06-06T12:40:00Z"] [2 0 "2015-06-10T21:51:00Z"]})

metabase.query-processor-test.timezones-test

FAIL in metabase.query-processor-test.timezones-test/filter-test (timezones_test.clj:69)
using test-data-with-timezones dataset 
:exasol 
Setting :report-timezone = "America/Los_Angeles"

If MBQL datetime literal strings do not explicitly specify a timezone, they should be parsed as if in the current reporting timezone (Pacific in this case)
expected: [[6 "Shad Ferdynand" "2014-08-02T05:30:00-07:00"]]
  actual: ([[6 "Shad Ferdynand" "2014-08-02T12:30:00-07:00"]])

FAIL in metabase.query-processor-test.timezones-test/filter-test (timezones_test.clj:75)
using test-data-with-timezones dataset 
:exasol 
Setting :report-timezone = "America/Los_Angeles"

MBQL datetime literal strings that include timezone should be parsed in it regardless of report timezone
expected: [[6 "Shad Ferdynand" "2014-08-02T05:30:00-07:00"]]
  actual: ([[6 "Shad Ferdynand" "2014-08-02T12:30:00-07:00"]])
load-data for h2 test-data users (reference H2 duration: 23,8 ms) took 3,3 ms
load-data for h2 test-data categories (reference H2 duration: 10,1 ms) took 3,2 ms
load-data for h2 test-data venues (reference H2 duration: 29,4 ms) took 10,7 ms
load-data for h2 test-data checkins (reference H2 duration: 130,4 ms) took 60,4 ms
Sync :h2 Database test-data (reference H2 duration: 1,1 s) took 555,8 ms

ERROR in metabase.query-processor-test.timezones-test/time-timezone-handling-test (util.clj:353)
Uncaught exception, not in assertion.

             clojure.lang.ExceptionInfo: Error in with-temporary-setting-values: Exasol does not have a :type/TimeWithTZ data type.
    setting: :report-timezone
      value: nil
java.lang.UnsupportedOperationException: Exasol does not have a :type/TimeWithTZ data type.
                                               metabase.test.data.exasol/eval81568/fn          exasol.clj:   55
                                               metabase.test.data.sql/eval77270/fn/fn             sql.clj:  161
                                                                    clojure.core/some            core.clj: 2705
                                                  metabase.test.data.sql/eval77270/fn             sql.clj:  155
                                                                                  ...                          
metabase.query-processor-test.timezones-test/driver-distinguishes-between-base-types?  timezones_test.clj:  198
           metabase.query-processor-test.timezones-test/supports-time-with-time-zone?  timezones_test.clj:  201
                       metabase.query-processor-test.timezones-test/expected-attempts  timezones_test.clj:  212
                             metabase.query-processor-test.timezones-test/fn/fn/fn/fn  timezones_test.clj:  228
                                   metabase.test.util/do-with-temporary-setting-value            util.clj:  351
                                metabase.query-processor-test.timezones-test/fn/fn/fn  timezones_test.clj:  227
                                              metabase.test.data.impl/do-with-dataset            impl.clj:  344
                                   metabase.query-processor-test.timezones-test/fn/fn  timezones_test.clj:  225
                        metabase.test.data.datasets/do-with-driver-when-testing/fn/fn        datasets.clj:   41
                                                       metabase.driver/do-with-driver          driver.clj:   60
                           metabase.test.data.datasets/do-with-driver-when-testing/fn        datasets.clj:   40
                                   metabase.test.data.datasets/do-when-testing-driver        datasets.clj:   29
                              metabase.test.data.datasets/do-with-driver-when-testing        datasets.clj:   39
                                      metabase.query-processor-test.timezones-test/fn  timezones_test.clj:  224
                                                             clojure.test/test-var/fn            test.clj:  717
[...]

FAIL in metabase.query-processor-test.timezones-test/native-params-filter-test (timezones_test.clj:172)

:exasol using test-data-with-timezones dataset 
Setting :report-timezone = "America/Los_Angeles"
 Native dates should be parsed with the report timezone Query with variable w/ single date
expected: [[6 "Shad Ferdynand" "2014-08-02T05:30:00-07:00"]
           [7 "Conchúr Tihomir" "2014-08-02T02:30:00-07:00"]]
  actual: ([[6 "Shad Ferdynand" "2014-08-02T12:30:00-07:00"]
            [7 "Conchúr Tihomir" "2014-08-02T09:30:00-07:00"]])

FAIL in metabase.query-processor-test.timezones-test/native-params-filter-test (timezones_test.clj:172)

:exasol using test-data-with-timezones dataset 
Setting :report-timezone = "America/Los_Angeles"
 Native dates should be parsed with the report timezone Query with field filter w/ date range
expected: [[6 "Shad Ferdynand" "2014-08-02T05:30:00-07:00"]
           [7 "Conchúr Tihomir" "2014-08-02T02:30:00-07:00"]]
  actual: ([])

FAIL in metabase.query-processor-test.timezones-test/native-params-filter-test (timezones_test.clj:172)

:exasol using test-data-with-timezones dataset 
Setting :report-timezone = "America/Los_Angeles"
 Native dates should be parsed with the report timezone Query with field filter w/ single date
expected: [[6 "Shad Ferdynand" "2014-08-02T05:30:00-07:00"]
           [7 "Conchúr Tihomir" "2014-08-02T02:30:00-07:00"]]
  actual: ([])

FAIL in metabase.query-processor-test.timezones-test/result-rows-test (timezones_test.clj:57)
using test-data-with-timezones dataset 
:exasol 
Setting :report-timezone = "US/Pacific"

There should be 1 checkins on July 3rd in the US/Pacific timezone
expected: [[10 "2014-07-03T12:30:00-07:00"]]
  actual: ([[10 "2014-07-03T19:30:00-07:00"]])

Ran 4 tests in 15,079 seconds
11 assertions, 6 failures, 1 error.
{:test 4, :pass 4, :fail 6, :error 1, :type :summary, :duration 15079.052671}
Tests failed.
@kaklakariada kaklakariada added bug Something isn't working source:exasol labels Dec 22, 2021
@kaklakariada kaklakariada added this to the GA milestone Dec 22, 2021
kaklakariada added a commit that referenced this issue Dec 22, 2021
@jakobbraun
Copy link
Contributor

Maybe I can help here. Let's have a call next year.

@kaklakariada
Copy link
Collaborator Author

Some of the failing tests where fixed with #14

@kaklakariada kaklakariada removed this from the GA milestone Jan 18, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants