New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate tmpname on its own #31462

Merged
merged 1 commit into from Dec 15, 2017
Jump to file or symbol
Failed to load files and symbols.
+6 −1
Diff settings

Always

Just for now

@@ -380,7 +380,7 @@ def pop; @queue.pop; end
def initialize(size)
@size = size
@queue = Server.new
file = File.join Dir.tmpdir, Dir::Tmpname.make_tmpname("rails-tests", "fd")
file = File.join Dir.tmpdir, tmpname
@url = "drbunix://#{file}"
@pool = nil
DRb.start_service @url, @queue
@@ -422,6 +422,11 @@ def translate_exceptions(result)
end
}
end
def tmpname
t = Time.now.strftime("%Y%m%d")
"rails-tests-#{t}-#{$$}-#{rand(0x100000000).to_s(36)}-fd"
end
end
if RUBY_ENGINE == "ruby" && PROCESS_COUNT > 0
ProTip! Use n and p to navigate between commits in a pull request.