From: Eric Wong Date: Fri, 25 Oct 2013 19:54:39 +0000 (+0000) Subject: tests: limit oobgc check to accepted sockets X-Git-Tag: v4.7.0~8 X-Git-Url: https://repo.or.cz/w/unicorn.git/commitdiff_plain/1dc099228ee0f59c13385a3e7346a2cb37d85153 tests: limit oobgc check to accepted sockets Otherwise these tests fail if we start using IO#autoclose=true on Ruby 1.9 (and also if we use IPv6 sockets for tests). --- diff --git a/t/oob_gc.ru b/t/oob_gc.ru index c6035b6d..c2535407 100644 --- a/t/oob_gc.ru +++ b/t/oob_gc.ru @@ -7,8 +7,7 @@ $gc_started = false # Mock GC.start def GC.start - ObjectSpace.each_object(BasicSocket) do |x| - next if Unicorn::HttpServer::LISTENERS.include?(x) + ObjectSpace.each_object(Kgio::Socket) do |x| x.closed? or abort "not closed #{x}" end $gc_started = true diff --git a/t/oob_gc_path.ru b/t/oob_gc_path.ru index e936a858..af8e3b9e 100644 --- a/t/oob_gc_path.ru +++ b/t/oob_gc_path.ru @@ -7,8 +7,7 @@ $gc_started = false # Mock GC.start def GC.start - ObjectSpace.each_object(BasicSocket) do |x| - next if Unicorn::HttpServer::LISTENERS.include?(x) + ObjectSpace.each_object(Kgio::Socket) do |x| x.closed? or abort "not closed #{x}" end $gc_started = true