Skip to content

Commit 28997e4

Browse files
committed
Make sure isolation tests are properlly parallelized
When `parallelize` is used, and the ActiveSupport::Testing::ParallelizeExecutor is being set, we can't call `parallelize_me!` ourselves since the parallel executor might not be set to run tests in parallel. In fact, maybe we should stop calling `parallelize_me!` altogether here and rely on `parallelize` to do the right thing, but this might break test classes that are using `ActiveSupport::Testing::Isolation` outside without calling `parallelize`.
1 parent bc21ccf commit 28997e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activesupport/lib/active_support/testing/isolation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Isolation
99

1010
def self.included(klass) # :nodoc:
1111
klass.class_eval do
12-
parallelize_me!
12+
parallelize_me! unless Minitest.parallel_executor.is_a?(ActiveSupport::Testing::ParallelizeExecutor)
1313
end
1414
end
1515

0 commit comments

Comments
 (0)