diff options
Diffstat (limited to 't')
-rw-r--r-- | t/heartbeat-timeout.ru | 4 | ||||
-rwxr-xr-x | t/t0004-heartbeat-timeout.sh | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/t/heartbeat-timeout.ru b/t/heartbeat-timeout.ru index 471bddc..d9904e8 100644 --- a/t/heartbeat-timeout.ru +++ b/t/heartbeat-timeout.ru @@ -1,12 +1,10 @@ use Rack::ContentLength -fifo = ENV['FIFO_PATH'] or abort "FIFO_PATH not defined" headers = { 'Content-Type' => 'text/plain' } run lambda { |env| case env['PATH_INFO'] when "/block-forever" - # one of these should block forever Process.kill(:STOP, $$) - ::File.open(fifo, "rb") { |fp| fp.syswrite("NEVER\n") } + sleep # in case STOP signal is not received in time [ 500, headers, [ "Should never get here\n" ] ] else [ 200, headers, [ "#$$\n" ] ] diff --git a/t/t0004-heartbeat-timeout.sh b/t/t0004-heartbeat-timeout.sh index 578f619..d7a54a7 100755 --- a/t/t0004-heartbeat-timeout.sh +++ b/t/t0004-heartbeat-timeout.sh @@ -7,7 +7,7 @@ t_begin "setup and startup" && { rainbows_setup $model echo timeout 3 >> $unicorn_config echo preload_app true >> $unicorn_config - FIFO_PATH=$fifo rainbows -D heartbeat-timeout.ru -c $unicorn_config + rainbows -D heartbeat-timeout.ru -c $unicorn_config rainbows_wait_start } |