http: remove deprecated reset method
[unicorn.git] / t / oob_gc.ru
blobc253540740f04acb81d945d749283ab088a7af09
1 #\-E none
2 require 'unicorn/oob_gc'
3 use Rack::ContentLength
4 use Rack::ContentType, "text/plain"
5 use Unicorn::OobGC
6 $gc_started = false
8 # Mock GC.start
9 def GC.start
10   ObjectSpace.each_object(Kgio::Socket) do |x|
11     x.closed? or abort "not closed #{x}"
12   end
13   $gc_started = true
14 end
15 run lambda { |env|
16   if "/gc_reset" == env["PATH_INFO"] && "POST" == env["REQUEST_METHOD"]
17     $gc_started = false
18   end
19   [ 200, {}, [ "#$gc_started\n" ] ]