1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

envutil.rb: reduce wait

* test/ruby/envutil.rb (EnvUtil.diagnostic_reports): reduce watching
  interval.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-12-14 22:34:47 +00:00
parent b46441824f
commit b3348ddd4d

View file

@ -166,8 +166,8 @@ module EnvUtil
timeformat = DIAGNOSTIC_REPORTS_TIMEFORMAT
pat = "#{path}/#{cmd}_#{now.strftime(timeformat)}[-_]*.crash"
first = true
3.times do
first ? (first = false) : sleep(1)
30.times do
first ? (first = false) : sleep(0.1)
Dir.glob(pat) do |name|
log = File.read(name) rescue next
if /\AProcess:\s+#{cmd} \[#{pid}\]$/ =~ log