Lein test metabase.integrations.common-test

When I run lein test it succeeds:

Ran 2433 tests containing 8471 assertions.
0 failures, 0 errors.

But when I run lein test metabase.integrations.common-test it gives the following error:

lein test metabase.integrations.common-test
[include-drivers middleware] Attempting to include these drivers: #{}
[include-drivers middleware] including these drivers: #{}
Warning: environ value /usr/lib/jvm/java-8-openjdk-amd64 for key :java-home has been overwritten with /home/ubuntu_user/jdk-11.0.9+11

lein test metabase.integrations.common-test

+---------------------+
| Initializing :db... |
+---------------------+

Setting up :h2 test DB and running migrations...
Load driver :sql took 2.7 s
Load driver :sql-jdbc took 2.7 s
Load driver :h2 took 7.1 sLoad driver :h2 took 2.1 s

Error initializing :db
#error {
 :cause Timed out after 5.0 s
 :via
 [{:type java.lang.Exception
   :message Timed out after 5.0 s
   :at [metabase.driver.util$can_connect_with_details_QMARK_ invokeStatic util.clj 40]}
  {:type java.util.concurrent.TimeoutException
   :message Timed out after 5.0 s
   :at [metabase.util$deref_with_timeout invokeStatic util.clj 315]}]
 :trace
 [[metabase.util$deref_with_timeout invokeStatic util.clj 315]
  [metabase.util$deref_with_timeout invoke util.clj 307]
  [metabase.util$do_with_timeout invokeStatic util.clj 321]
  [metabase.util$do_with_timeout invoke util.clj 318]
  [metabase.driver.util$can_connect_with_details_QMARK_ invokeStatic util.clj 34]
  [metabase.driver.util$can_connect_with_details_QMARK_ doInvoke util.clj 23]
  [clojure.lang.RestFn invoke RestFn.java 442]
  [clojure.lang.Var invoke Var.java 393]
  [metabase.db$eval26296$verify_db_connection__26305$fn__26308$fn__26309 invoke db.clj 316]
  [metabase.db$eval26296$verify_db_connection__26305$fn__26308 invoke db.clj 315]
  [metabase.db$eval26296$verify_db_connection__26305 invoke db.clj 307]
  [metabase.db$eval26296$verify_db_connection__26305$fn__26306 invoke db.clj 310]
  [metabase.db$eval26296$verify_db_connection__26305 invoke db.clj 307]
  [metabase.db$setup_db_BANG__STAR_$fn__26344 invoke db.clj 352]
  [metabase.util$do_with_us_locale invokeStatic util.clj 670]
  [metabase.util$do_with_us_locale invoke util.clj 656]
  [metabase.db$setup_db_BANG__STAR_ invokeStatic db.clj 351]
  [metabase.db$setup_db_BANG__STAR_ invoke db.clj 346]
  [metabase.db$setup_db_from_env_BANG_ invokeStatic db.clj 365]
  [metabase.db$setup_db_from_env_BANG_ invoke db.clj 358]
  [metabase.db$setup_db_BANG_$fn__26349 invoke db.clj 375]
  [metabase.db$setup_db_BANG_ invokeStatic db.clj 373]
  [metabase.db$setup_db_BANG_ invoke db.clj 368]
  [metabase.test.initialize.db$init_BANG_ invokeStatic db.clj 12]
  [metabase.test.initialize.db$init_BANG_ invoke db.clj 9]
  [clojure.lang.Var invoke Var.java 380]
  [metabase.test.initialize$eval46685$fn__46686 invoke initialize.clj 86]
  [clojure.lang.MultiFn invoke MultiFn.java 229]
  [metabase.test.initialize$initialize_if_needed_BANG__STAR_$fn__46658 invoke initialize.clj 42]
  [metabase.util$do_with_timeout$fn__9285 invoke util.clj 324]
  [clojure.core$binding_conveyor_fn$fn__5754 invoke core.clj 2030]
  [clojure.lang.AFn call AFn.java 18]
  [java.util.concurrent.FutureTask run FutureTask.java 264]
  [java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1128]
  [java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 628]
  [java.lang.Thread run Thread.java 834]]}
Tests failed.
Error encountered performing task 'test' with profile(s): 'base,system,user,provided,dev,with-include-drivers-middleware,test-common'
Tests failed.

As the logs show, it tries to load the h2 driver twice. Not sure if this is the cause of issue. This comment of camsaul may be related.

Actually I had cloned the Metabase Repo a few weeks ago, and made some changes during the last weeks for a PR I was working on. Today I ran the above test and got the error. Failing to find the cause, I cloned a fresh copy of the repo and ran that specific test, but still got the error. I guess this means something has been saved on my system which is causing the error (because even with a fresh clone I’m still getting that error). But it is weird that when I run all tests it succeeds.

Hi @King_Edward
There are a lot of changes the past couple of weeks to the repo.
Currently all developers are using REPL: https://github.com/metabase/metabase/wiki/Metabase-Backend-Dev-Secrets
But if the full test succeeds, then you can likely ignore problems with individual test failing.