Update test helper to call parallelize according to fork support

This commit is contained in:
Brandon Fish 2021-01-25 13:50:41 -06:00
parent cdcee5cb3a
commit 7f2c6a87fe
2 changed files with 10 additions and 2 deletions

View File

@ -179,7 +179,11 @@ module ActionDispatch
end
class ActiveSupport::TestCase
parallelize
if Process.respond_to?(:fork) && !Gem.win_platform?
parallelize
else
parallelize(with: :threads)
end
include ActiveSupport::Testing::MethodCallAssertions

View File

@ -28,7 +28,11 @@ ActiveSupport.to_time_preserves_timezone = ENV["PRESERVE_TIMEZONES"] == "1"
I18n.enforce_available_locales = false
class ActiveSupport::TestCase
parallelize
if Process.respond_to?(:fork) && !Gem.win_platform?
parallelize
else
parallelize(with: :threads)
end
include ActiveSupport::Testing::MethodCallAssertions