Merge pull request #3489 from ctiller/portlog

Retry checking port_server on socket timeout errors
pull/3494/head
Jan Tattermusch 9 years ago
commit 9d17f09ebe
  1. 5
      tools/run_tests/run_tests.py

@ -40,6 +40,7 @@ import os
import platform import platform
import random import random
import re import re
import socket
import subprocess import subprocess
import sys import sys
import time import time
@ -736,6 +737,10 @@ def _start_port_server(port_server_port):
urllib2.urlopen('http://localhost:%d/get' % port_server_port, urllib2.urlopen('http://localhost:%d/get' % port_server_port,
timeout=1).read() timeout=1).read()
break break
except socket.timeout:
print "waiting for port_server"
time.sleep(0.5)
waits += 1
except urllib2.URLError: except urllib2.URLError:
print "waiting for port_server" print "waiting for port_server"
time.sleep(0.5) time.sleep(0.5)

Loading…
Cancel
Save