提交 493470ac 编写于 作者: L Lee Quarella

Stop creating too many test databases

Issue #39291

In https://github.com/rails/rails/pull/38893 parallel test worker ids
were changed to `SecureRandom.uuid` to keep track of inflight work
across distributed instances, but negelected to change the worker
callbacks to match.  This caused a new set of unique test databases are
created with every test run.

This commit makes the appropriate change to worker callbacks so only one
set of of parallel test databases are created.
上级 35bf86fe
......@@ -76,13 +76,13 @@ def safe_record(reporter, result)
def after_fork
Parallelization.after_fork_hooks.each do |cb|
cb.call(@id)
cb.call(@number)
end
end
def run_cleanup
Parallelization.run_cleanup_hooks.each do |cb|
cb.call(@id)
cb.call(@number)
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册