t/lib.perl: fix Perl integration tests w/o installation
[unicorn.git] / t / heartbeat-timeout.ru
blobccc6a8e93d42c9c8d6a28bc260c872ae08b3e711
1 # frozen_string_literal: false
2 use Rack::ContentLength
3 headers = { 'content-type' => 'text/plain' }
4 run lambda { |env|
5   case env['PATH_INFO']
6   when "/block-forever"
7     Process.kill(:STOP, $$)
8     sleep # in case STOP signal is not received in time
9     [ 500, headers, [ "Should never get here\n" ] ]
10   else
11     [ 200, headers, [ "#$$" ] ]
12   end