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
|
puts fake_command
|
||||||
|
|
||||||
# We could run these in parallel, but pretty much all of the
|
if Process.respond_to?(:fork)
|
||||||
# railties tests already run in parallel, so ¯\_(⊙︿⊙)_/¯
|
# We could run these in parallel, but pretty much all of the
|
||||||
Process.waitpid fork {
|
# railties tests already run in parallel, so ¯\_(⊙︿⊙)_/¯
|
||||||
ARGV.clear.concat test_options
|
Process.waitpid fork {
|
||||||
Rake.application = nil
|
ARGV.clear.concat test_options
|
||||||
|
Rake.application = nil
|
||||||
|
|
||||||
load file
|
load file
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
Process.wait spawn(fake_command)
|
||||||
|
end
|
||||||
|
|
||||||
unless $?.success?
|
unless $?.success?
|
||||||
failing_files << file
|
failing_files << file
|
||||||
|
|
Loading…
Reference in New Issue