Skip to content

Commit 1fe4d30

Browse files
Trottrvagg
authored andcommitted
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: #3864 Fixes: #2815 PR-URL: #3941 Reviewed-By: Fedor Indutny <[email protected]>
1 parent 665a35d commit 1fe4d30

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/test.py

+7
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,13 @@ def RunSingle(self, parallel, thread_id):
138138
try:
139139
start = datetime.now()
140140
output = case.Run()
141+
# SmartOS has a bug that causes unexpected ECONNREFUSED errors.
142+
# See https://smartos.org/bugview/OS-2767
143+
# If ECONNREFUSED on SmartOS, retry the test one time.
144+
if (output.UnexpectedOutput() and
145+
sys.platform == 'sunos5' and
146+
'ECONNREFUSED' in output.output.stderr):
147+
output = case.Run()
141148
case.duration = (datetime.now() - start)
142149
except IOError, e:
143150
return

0 commit comments

Comments
 (0)