Browse Source

test: retry on smartos if ECONNREFUSED

SmartOS has a bug that causes unexpected ECONNREFUSED errors.

See https://smartos.org/bugview/OS-2767

If ECONNREFUSED on SmartOS, retry the test one time.

Fixes: https://github.com/nodejs/node/issues/3864
Fixes: https://github.com/nodejs/node/issues/2815
PR-URL: https://github.com/nodejs/node/pull/3941
Reviewed-By: Fedor Indutny <fedor@indutny.com>
v5.x
Rich Trott 9 years ago
committed by Rod Vagg
parent
commit
1fe4d30efc
  1. 7
      tools/test.py

7
tools/test.py

@ -138,6 +138,13 @@ class ProgressIndicator(object):
try:
start = datetime.now()
output = case.Run()
# SmartOS has a bug that causes unexpected ECONNREFUSED errors.
# See https://smartos.org/bugview/OS-2767
# If ECONNREFUSED on SmartOS, retry the test one time.
if (output.UnexpectedOutput() and
sys.platform == 'sunos5' and
'ECONNREFUSED' in output.output.stderr):
output = case.Run()
case.duration = (datetime.now() - start)
except IOError, e:
return

Loading…
Cancel
Save