Skip to content

Commit fb395bb

Browse files
committed
Fix handling of Errno::EPIPE in multipart tests.
1 parent bce149b commit fb395bb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/spec_multipart.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ def rd.rewind; end
310310
wr.write("--AaB03x--\r\n")
311311
wr.close
312312
true
313+
rescue Errno::EPIPE
314+
# Expected when the reader closes due to size limit violation
315+
true
313316
end
314317

315318
fixture = {
@@ -346,6 +349,9 @@ def rd.rewind; end
346349
wr.write("\r\n--AaB03x--\r\n")
347350
wr.close
348351
true
352+
rescue Errno::EPIPE
353+
# Expected when the reader closes due to size limit violation
354+
true
349355
end
350356

351357
fixture = {

0 commit comments

Comments
 (0)