From c27260bebda77ef29e1953fb092b6162c6dcebd7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 19 Feb 2009 03:46:33 -0800 Subject: test_upload: trap EPIPE if a connection shuts us down, too Reset connections can also return EPIPE under Linux, not just ECONNRESET; so be sure to trap that error, too. --- test/unit/test_upload.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/unit/test_upload.rb b/test/unit/test_upload.rb index 7629fbe..edc94da 100644 --- a/test/unit/test_upload.rb +++ b/test/unit/test_upload.rb @@ -78,7 +78,7 @@ class UploadTest < Test::Unit::TestCase buf = ' ' * @bs sock.syswrite("PUT / HTTP/1.0\r\nContent-Length: #{length}\r\n\r\n") @count.times { sock.syswrite(buf) } - assert_raise Errno::ECONNRESET do + assert_raise(Errno::ECONNRESET, Errno::EPIPE) do ::Unicorn::Const::CHUNK_SIZE.times { sock.syswrite(buf) } end end -- cgit v1.2.3-24-ge0c7