Fallback to spawn instead of fork in jruby (#36111)
* Fallback to spawn instead of fork in jruby
This commit: b342db6
introduced a `fork` fork when running the railties
tests since this is not supported in jruby we fallback to using spawn.
Fixes: https://github.com/rails/rails/issues/35900
This commit is contained in:
parent
4dfdc7eb90
commit
dbcaf9d157
|
@ -95,14 +95,18 @@ namespace :test do
|
|||
])
|
||||
puts fake_command
|
||||
|
||||
# We could run these in parallel, but pretty much all of the
|
||||
# railties tests already run in parallel, so ¯\_(⊙︿⊙)_/¯
|
||||
Process.waitpid fork {
|
||||
ARGV.clear.concat test_options
|
||||
Rake.application = nil
|
||||
if Process.respond_to?(:fork)
|
||||
# We could run these in parallel, but pretty much all of the
|
||||
# railties tests already run in parallel, so ¯\_(⊙︿⊙)_/¯
|
||||
Process.waitpid fork {
|
||||
ARGV.clear.concat test_options
|
||||
Rake.application = nil
|
||||
|
||||
load file
|
||||
}
|
||||
load file
|
||||
}
|
||||
else
|
||||
Process.wait spawn(fake_command)
|
||||
end
|
||||
|
||||
unless $?.success?
|
||||
failing_files << file
|
||||
|
|
Loading…
Reference in New Issue