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 committed Nov 23, 2015
1 parent 487de19 commit 8bc8038
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 8bc8038

Please sign in to comment.