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
  • Loading branch information
Trott committed Nov 20, 2015
1 parent ca2e8b2 commit c5eed86
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
output.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 c5eed86

Please sign in to comment.