about summary refs log tree commit homepage
path: root/test/server_helper.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-11-06 17:59:25 +0000
committerEric Wong <normalperson@yhbt.net>2013-11-06 18:52:55 +0000
commita32d80a93101b884c44991247b8278002368d483 (patch)
treee7c8ceedffccbf33d023d9a6f7267886072e66ee /test/server_helper.rb
parent52f2a4055a0f7e27df02d40bb42dda446dcdf89d (diff)
downloadyahns-a32d80a93101b884c44991247b8278002368d483.tar.gz
We can use the wbuf_close return value instead to ensure we close
tmpio properly and follow the same code path as a normal
(:wait_writable-triggering) buffered response would.

Add a few tests to ensure we properly close the response body
for exec_cgi, where I noticed zombies and started me down this
rabbit hole looking for places where the response body was not
closed properly.
Diffstat (limited to 'test/server_helper.rb')
-rw-r--r--test/server_helper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/server_helper.rb b/test/server_helper.rb
index 2f9266a..d4b8f98 100644
--- a/test/server_helper.rb
+++ b/test/server_helper.rb
@@ -16,6 +16,7 @@ module ServerHelper
   end
 
   def poke_until_dead(pid)
+    assert_operator pid, :>, 0
     Timeout.timeout(10) do
       begin
         Process.kill(0, pid)