From 31fdaa4aa569eb4470c5e65d834165c3e4ab48c2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 25 Sep 2015 13:09:59 -0700 Subject: [PATCH 1/2] Retry checking port_server on socket timeout errors --- tools/run_tests/run_tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index d271137ca12..3c2b2a8b893 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -736,6 +736,10 @@ def _start_port_server(port_server_port): urllib2.urlopen('http://localhost:%d/get' % port_server_port, timeout=1).read() break + except socket.timeout: + print "waiting for port_server" + time.sleep(0.5) + waits += 1 except urllib2.URLError: print "waiting for port_server" time.sleep(0.5) From 8287523dafd1697d29d0abf942b097fd3ca0c56f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 25 Sep 2015 13:57:34 -0700 Subject: [PATCH 2/2] Add missing import --- tools/run_tests/run_tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 3c2b2a8b893..52d753729f4 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -40,6 +40,7 @@ import os import platform import random import re +import socket import subprocess import sys import time