record load average at fail
On a high load machine, the following test can fail. This patch simply records the load average with `uptime`. ``` 1) Failure: TestThreadQueue#test_thr_kill [/tmp/ruby/src/trunk_gcc10/test/ruby/test_thread_queue.rb:239]: only 165/250 done in 60 seconds. ```
This commit is contained in:
parent
98ac3f1fe4
commit
d0b5f31554
@ -235,8 +235,14 @@ class TestThreadQueue < Test::Unit::TestCase
|
||||
end
|
||||
_eom
|
||||
rescue Timeout::Error
|
||||
# record load average:
|
||||
uptime = `uptime` rescue nil
|
||||
if uptime && /(load average: [\d.]+),/ =~ uptime
|
||||
la = " (#{$1})"
|
||||
end
|
||||
|
||||
count = File.read("#{d}/test_thr_kill_count").to_i
|
||||
flunk "only #{count}/#{total_count} done in #{timeout} seconds."
|
||||
flunk "only #{count}/#{total_count} done in #{timeout} seconds.#{la}"
|
||||
end
|
||||
}
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user