Skip to content

Commit

Permalink
test: retry on smartos if ECONNREFUSED
Browse files Browse the repository at this point in the history
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: #3864
Fixes: #2815
PR-URL: #3941
Reviewed-By: Fedor Indutny <fedor@indutny.com>
  • Loading branch information
Trott authored and rvagg committed Dec 5, 2015
1 parent 665a35d commit 1fe4d30
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1fe4d30

Please sign in to comment.