How to skip certain driver tests?

Hello!
I am working an a new driver for the Exasol database. Exasol does not have a TIME data type, so many integration tests are failing. Oracle also also doesn't support TIME, so the tests fail early when running TIME tests.

I didn't find any hints in the source code or the CI script how to skip TIME tests.

Please give me an advise how to skip certain tests.

Thank you!

Hi @kaklakariada
Are you providing a list of types to test?
https://github.com/metabase/metabase/blob/master/modules/drivers/oracle/test/metabase/test/data/oracle.clj#L56-L69
https://github.com/metabase/metabase/blob/master/modules/drivers/sparksql/test/metabase/test/data/sparksql.clj#L24-L36

Just for reference: https://github.com/metabase/metabase/issues/5509

Hi @flamber
Yes, I provided the types list just like for Oracle, but the tests fail when the UnsupportedOperationException is thrown:

Failed to create :exasol 'test-data-with-time' test database: Exasol does not have a :type/Time data type. 
 #error {
 :cause Exasol does not have a :type/Time data type.
 :via
 [{:type java.lang.UnsupportedOperationException
   :message Exasol does not have a :type/Time data type.
   :at [metabase.test.data.exasol$eval190654$fn__190655 invoke exasol.clj 56]}]
 :trace
 [[metabase.test.data.exasol$eval190654$fn__190655 invoke exasol.clj 56]
  [clojure.lang.MultiFn invoke MultiFn.java 234]
  [metabase.test.data.sql$eval166175$fn__166178$iter__166183__166187$fn__166188$fn__166189 invoke sql.clj 219]
  [metabase.test.data.sql$eval166175$fn__166178$iter__166183__166187$fn__166188 invoke sql.clj 208]
...

I start the tests by linking the exasol driver into modules/drivers/exasol, adding it to deps.edn and running

DRIVERS=exasol clojure -X:dev:ci:drivers:drivers-dev:test

Once the initial version of the driver is finished, we will publish it on GitHub.

@kaklakariada So this does include Time in the test, but not in the fields registered in the driver:
https://github.com/revolut-engineering/metabase/tree/exasol-driver/modules/drivers/exasol
I don't know if it ever passed any tests.

I'm guessing your problem comes from this, but it seems strange that somehow your driver is recognized as a "normal" driver
https://github.com/metabase/metabase/blob/8f2cc20461f753e5ba77256811bb38c1df55b325/test/metabase/api/table_test.clj#L709

@flamber Thank you for the link to table_test.clj, it shows that drivers need to be excluded explicitly from certain tests.

We are developing the driver from scratch independently from revolut-engineering.

Regarding the 'normal' driver: according to the comment, all drivers defined in environment variable DRIVERS are tested.

Now I will think about how to skip the TIME tests for Exasol, maybe by patching the tests to add :exasol to the list...