diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-05 01:16:19 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-05 01:16:19 +0000 |
commit | 14e1137989d39f818fe3bdb8f328e493361c9d6f (patch) | |
tree | 58f3f546c072956c46a186f6fdd074db7b6c63c2 | |
parent | 68a16f9a2dfbb773744adaa63468449838761015 (diff) | |
download | ruby-14e1137989d39f818fe3bdb8f328e493361c9d6f.tar.gz |
Old linux (at least CentOS 5.6, kernel 2.6.18) wakes up 4.99 sec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_sleep.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_sleep.rb b/test/ruby/test_sleep.rb index 96c38fde5a..a2730a3a64 100644 --- a/test/ruby/test_sleep.rb +++ b/test/ruby/test_sleep.rb @@ -6,7 +6,8 @@ class TestSleep < Test::Unit::TestCase start = Time.now sleep 5 slept = Time.now-start - assert_operator(5.0, :<=, slept) + bottom = /Linux ([\d.]+)/ =~ `uname -sr` && $1.split('.')>%w/2 6.18/ ? 4.99 : 5.0 + assert_operator(bottom, :<=, slept) assert_operator(slept, :<=, 6.0, "[ruby-core:18015]: longer than expected") ensure GC.enable |