about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <bofh@yhbt.net>2020-01-20 09:08:14 +0000
committerEric Wong <bofh@yhbt.net>2020-01-20 10:01:47 +0000
commite5231b624227cba11ab6cf0825ff3daf328eebd7 (patch)
tree83d7244e4dd98646417ff9c0ef777bcacd4ec093 /test
parentb813847fcce82907c5350c875bec2ad6e2a6412f (diff)
downloadunicorn-e5231b624227cba11ab6cf0825ff3daf328eebd7.tar.gz
It was added nearly 11 years ago in commit 6945342a1f0a4caa
("Transfer-Encoding: chunked streaming input support") but
never used.
Diffstat (limited to 'test')
-rw-r--r--test/test_helper.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index c21f75d..94a5b1b 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -265,32 +265,6 @@ def wait_for_death(pid)
   raise "PID:#{pid} never died!"
 end
 
-# executes +cmd+ and chunks its STDOUT
-def chunked_spawn(stdout, *cmd)
-  fork {
-    crd, cwr = IO.pipe
-    crd.binmode
-    cwr.binmode
-    crd.sync = cwr.sync = true
-
-    pid = fork {
-      STDOUT.reopen(cwr)
-      crd.close
-      cwr.close
-      exec(*cmd)
-    }
-    cwr.close
-    begin
-      buf = crd.readpartial(16384)
-      stdout.write("#{'%x' % buf.size}\r\n#{buf}")
-    rescue EOFError
-      stdout.write("0\r\n")
-      pid, status = Process.waitpid(pid)
-      exit status.exitstatus
-    end while true
-  }
-end
-
 def reset_sig_handlers
   %w(WINCH QUIT INT TERM USR1 USR2 HUP TTIN TTOU CHLD).each do |sig|
     trap(sig, "DEFAULT")