From b08410facbccf96c67822a92888de0bc1910390e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 17 Jun 2011 08:59:02 +0000 Subject: test_http_parser: fix for URI too long errors (#3) The random garbage generator may occasionally generate URIs that are too long and cause the URI-specific error to be raised instead of the generic parser error we recently introduced. Follow-up-to: commit 742c4d77f179a757dbcb1fa350f9d75b757acfc7 --- test/unit/test_http_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/unit/test_http_parser.rb b/test/unit/test_http_parser.rb index 15e1745..27196db 100644 --- a/test/unit/test_http_parser.rb +++ b/test/unit/test_http_parser.rb @@ -769,7 +769,7 @@ class HttpParserTest < Test::Unit::TestCase # finally just that random garbage gets blocked all the time 10.times do |c| get = "GET #{rand_data(1024, 1024+(c*1024), false)} #{rand_data(1024, 1024+(c*1024), false)}\r\n\r\n" - assert_raises Unicorn::HttpParserError do + assert_raises(Unicorn::HttpParserError,Unicorn::RequestURITooLongError) do parser.buf << get parser.parse parser.clear -- cgit v1.2.3-24-ge0c7