summary refs log tree commit homepage
path: root/t/heartbeat-timeout.ru
blob: d9904e8e22cf7d4f38b89e6824b90f69f72f3b8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use Rack::ContentLength
headers = { 'Content-Type' => 'text/plain' }
run lambda { |env|
  case env['PATH_INFO']
  when "/block-forever"
    Process.kill(:STOP, $$)
    sleep # in case STOP signal is not received in time
    [ 500, headers, [ "Should never get here\n" ] ]
  else
    [ 200, headers, [ "#$$\n" ] ]
  end
}