test: fix parallel/test-http-destroyed-socket-write2
authorBen Noordhuis <info@bnoordhuis.nl>
Fri, 23 Jan 2015 16:14:36 +0000 (17:14 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Fri, 23 Jan 2015 16:59:10 +0000 (17:59 +0100)
commit4f95b5d8253ef64e3673b9fa178c41dc8109b72b
treeef6734614f9bf1a45b33c2c2806506a7618e500e
parent5ba307a97879342ff81aa813ffd7da46b6411b1c
test: fix parallel/test-http-destroyed-socket-write2

Ameliorate a timing sensitivity issue by switching from setImmediate()
to setTimeout() with a 50 ms timeout.

This commit also adds EPIPE as an accepted error (besides ECONNABORT
and ECONNRESET) because that's a plausible outcome given the timing
sensitive nature of test.

PR-URL: https://github.com/iojs/io.js/pull/575
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
test/parallel/test-http-destroyed-socket-write2.js