aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-11-28 14:18:27 +0900
committerYuji Yaginuma <yuuji.yaginuma@gmail.com>2018-11-28 15:43:58 +0900
commit8687a035d790865f2cc3a39163d77697aad92f2b (patch)
tree5e1c463aa4c7ad8305fd92a1c6f2085aa8398ff9 /activesupport
parentac721c855203ac7570545c0e85fe086f8e94d94a (diff)
downloadrails-8687a035d790865f2cc3a39163d77697aad92f2b.tar.gz
rails-8687a035d790865f2cc3a39163d77697aad92f2b.tar.bz2
rails-8687a035d790865f2cc3a39163d77697aad92f2b.zip
Pass the test reporter by reference
This prevents the array from being dumped as a DRbObject so we can reduce communication with the server. In DRb, if `Marshal.dump` fails, `Marshal.dump` is executed again after converting the object to `DRbObject`. This also possible to reduce the execution of `Marshal.dump` by converting to a format that can be marshalized in advance using `DRbObject`. This is the same approach to Action Pack's parallel test. Ref: 5751b7ea58d7cf259dda30fb42fff51fc6ae93d5
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/testing/parallelization.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/testing/parallelization.rb b/activesupport/lib/active_support/testing/parallelization.rb
index 8de01eb19b..c5d3a88131 100644
--- a/activesupport/lib/active_support/testing/parallelization.rb
+++ b/activesupport/lib/active_support/testing/parallelization.rb
@@ -23,6 +23,7 @@ module ActiveSupport
end
def <<(o)
+ o[2] = DRbObject.new(o[2]) if o
@queue << o
end