From e2dee8df0b30b963b6425810fd5fdf0883d09133 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 20 Nov 2015 10:15:31 -0800 Subject: [PATCH] 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 --- tools/test.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/test.py b/tools/test.py index 26b70233d53f85..49db74727aea38 100755 --- a/tools/test.py +++ b/tools/test.py @@ -138,6 +138,13 @@ def RunSingle(self, parallel, thread_id): 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