Skip to content

Commit

Permalink
Merge pull request rails#41237 from bjfish/bjfish/Update-parallelize-…
Browse files Browse the repository at this point in the history
…usage

Update test helper to call parallelize according to fork support
  • Loading branch information
eugeneius authored Jan 26, 2021
2 parents 8b3fc5c + 7f2c6a8 commit a090847
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion actionview/test/abstract_unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ def stderr_logger
end

class ActiveSupport::TestCase
parallelize
if Process.respond_to?(:fork) && !Gem.win_platform?
parallelize
else
parallelize(with: :threads)
end

include ActiveSupport::Testing::MethodCallAssertions

Expand Down
6 changes: 5 additions & 1 deletion activesupport/test/abstract_unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
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

Expand Down

0 comments on commit a090847

Please sign in to comment.