about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-04-12 22:18:59 +0000
committerEric Wong <normalperson@yhbt.net>2013-04-12 22:25:07 +0000
commit486cafa9da2dcaf988d9ecdf1b407c7e876a0217 (patch)
tree23a09390197de61c1130011285360ea1ba825111
parentd4b5c8d7c1abe673915aca8674c5e0b55a0aaffa (diff)
downloadsleepy_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.rb2
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