Skip to content

Commit

Permalink
[py] urllib throws on 404 so let's check the /status endpoint that re…
Browse files Browse the repository at this point in the history
…turns 200
  • Loading branch information
barancev committed Sep 25, 2019
1 parent 1881111 commit c746d7a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions py/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,12 @@ def wait_for_server(url, timeout):
try:
urlopen(url)
return 1
except IOError as e:
print(e)
except IOError:
time.sleep(0.2)
return 0

_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
url = 'http://{}:{}/'.format(_host, _port)
url = 'http://{}:{}/status'.format(_host, _port)
try:
_socket.connect((_host, _port))
print('The remote driver server is already running or something else'
Expand Down

0 comments on commit c746d7a

Please sign in to comment.