FIX: Don't attempt to migrate multisite test db while holding the mutex (#14298)

FIX: Don’t attempt to migrate multisite test db while holding the mutex (#14298)

Since you’ll have to wait for the mutex to timeout before it can continue.

diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake
index e757d9d..9f3c6fc 100644
--- a/lib/tasks/db.rake
+++ b/lib/tasks/db.rake
@@ -231,10 +231,10 @@ task 'db:migrate' => ['load_config', 'environment', 'set_locale'] do |_, args|
     if !Discourse.skip_post_deployment_migrations? && ENV['SKIP_OPTIMIZE_ICONS'] != '1'
       SiteIconManager.ensure_optimized!
     end
+  end
 
-    if !Discourse.is_parallel_test? && MultisiteTestHelpers.load_multisite?
-      system("RAILS_DB=discourse_test_multisite rake db:migrate")
-    end
+  if !Discourse.is_parallel_test? && MultisiteTestHelpers.load_multisite?
+    system("RAILS_DB=discourse_test_multisite rake db:migrate")
   end
 end
 

GitHub sha: 6262396d8aec95e6f71cdf58469773de638caa6b

This commit appears in #14298 which was approved by Falco. It was merged by danielwaterworth.