diff options
author | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-05-24 08:34:17 +0000 |
---|---|---|
committer | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-05-24 08:34:17 +0000 |
commit | 7b53a9afd2fa7ec7086ad8df1d92cc6c693b1bb1 (patch) | |
tree | f0760b8503bc09d6e0ec972dad0c0ea56fba9c11 /test/test_ws.rb | |
parent | 0a3041fea19904e0bfdf4854d081017b11516dc0 (diff) | |
download | unicorn-7b53a9afd2fa7ec7086ad8df1d92cc6c693b1bb1.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@212 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'test/test_ws.rb')
-rw-r--r-- | test/test_ws.rb | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/test/test_ws.rb b/test/test_ws.rb index daf78d6..4945e4e 100644 --- a/test/test_ws.rb +++ b/test/test_ws.rb @@ -88,24 +88,30 @@ class WebServerTest < Test::Unit::TestCase end def test_bad_client - do_test("GET /test HTTP/BAD", 3) + redirect_test_io do + do_test("GET /test HTTP/BAD", 3) + end end def test_header_is_too_long - long = "GET /test HTTP/1.1\r\n" + ("X-Big: stuff\r\n" * 15000) + "\r\n" - assert_raises Errno::ECONNRESET, Errno::EPIPE do - do_test(long, long.length/2) + redirect_test_io do + long = "GET /test HTTP/1.1\r\n" + ("X-Big: stuff\r\n" * 15000) + "\r\n" + assert_raises Errno::ECONNRESET, Errno::EPIPE do + do_test(long, long.length/2) + end end end def test_num_processors_overload - assert_raises Errno::ECONNRESET, Errno::EPIPE do - tests = [ - Thread.new { do_test(@request, 1) }, - Thread.new { do_test(@request, 10) }, - ] - - tests.each {|t| t.join} + redirect_test_io do + assert_raises Errno::ECONNRESET, Errno::EPIPE do + tests = [ + Thread.new { do_test(@request, 1) }, + Thread.new { do_test(@request, 10) }, + ] + + tests.each {|t| t.join} + end end end |