diff options
Diffstat (limited to 't/heartbeat-timeout.ru')
-rw-r--r-- | t/heartbeat-timeout.ru | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/heartbeat-timeout.ru b/t/heartbeat-timeout.ru new file mode 100644 index 0000000..d9904e8 --- /dev/null +++ b/t/heartbeat-timeout.ru @@ -0,0 +1,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 +} |