diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-04-12 22:18:59 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-04-12 22:25:07 +0000 |
commit | 486cafa9da2dcaf988d9ecdf1b407c7e876a0217 (patch) | |
tree | 23a09390197de61c1130011285360ea1ba825111 | |
parent | d4b5c8d7c1abe673915aca8674c5e0b55a0aaffa (diff) | |
download | sleepy_penguin-486cafa9da2dcaf988d9ecdf1b407c7e876a0217.tar.gz |
This helps avoid test errors on Rubinius where rb_gc() is a noop. Otherwise, we might as well infinite loop on thread-creation to trigger GC.
-rw-r--r-- | test/test_epoll_gc.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_epoll_gc.rb b/test/test_epoll_gc.rb index b0a1868..ed2df05 100644 --- a/test/test_epoll_gc.rb +++ b/test/test_epoll_gc.rb @@ -42,6 +42,8 @@ class TestEpollGC < Test::Unit::TestCase 2048.times { IO.pipe; File.open(__FILE__)} done = true end + rescue Errno::EMFILE, Errno::ENFILE + Thread.new { GC.start }.join end while true end end if ENV["GC_STRESS"].to_i != 0 |