diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-28 05:39:29 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-28 05:39:29 +0000 |
commit | f25ba685eb5a11bf64be93c724131c371c634e6b (patch) | |
tree | 85224b5c75d77dbf903cc3b29c64edac64aa64cf | |
parent | 72a564a8f402c6270aeb3cc9a48b0bba1f46f6c2 (diff) | |
download | ruby-f25ba685eb5a11bf64be93c724131c371c634e6b.tar.gz |
test/ruby/test_io.rb: adjust CPU usage check to 10%
I miscalculated for r58934, since we sleep 100ms, and
the worst possible case is 100 Hz in the kernel meaning
we only have 10ms resolution. So, we need to increase
our CPU percentage to >= 10% for this.
This should be more than enough for our CI machines which
have 300 Hz kernels [ruby-core:81429]:
http://ci.rvm.jp/results/trunk-test@sasada-8core/1495942555
* test/ruby/test_io.rb (test_copy_stream_no_busy_wait):
override default percentage
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_io.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 5d14aae601..5c98a59be0 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -533,9 +533,10 @@ class TestIO < Test::Unit::TestCase if have_nonblock? def test_copy_stream_no_busy_wait + msg = 'r58534 [ruby-core:80969] [Backport #13533]' IO.pipe do |r,w| r.nonblock = true - assert_cpu_usage_low('r58534 [ruby-core:80969] [Backport #13533]') do + assert_cpu_usage_low(msg, pct: 0.11) do th = Thread.new { IO.copy_stream(r, IO::NULL) } sleep 0.1 w.close |