about summary refs log tree commit homepage
path: root/t/heartbeat-timeout.ru
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-06-16 23:11:28 +0000
committerEric Wong <normalperson@yhbt.net>2011-06-16 23:14:04 +0000
commit95f543a9583e58c56b1c480df84b4b88e6669403 (patch)
tree63e41e454e7001ed213ea6f5520f36ab6d3ea579 /t/heartbeat-timeout.ru
parent4beeb52b1c52ea4486dea13cebe2a8438a9f2139 (diff)
downloadunicorn-95f543a9583e58c56b1c480df84b4b88e6669403.tar.gz
Just in case we break anything
Diffstat (limited to 't/heartbeat-timeout.ru')
-rw-r--r--t/heartbeat-timeout.ru12
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
+}