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>
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