Commit f14314d7 authored by Tricia Crichton's avatar Tricia Crichton Committed by Commit Bot

[ChromeDriver] increase timeout for tests

Python tests show increased flakiness caused by command timeouts after
reducing the timeout to 10 seconds. Increasing to 30 seconds to reduce
timeouts

Bug: 1045241
Change-Id: I0f564f564155c294ac3e041518096b88a705f94c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2028174Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: Tricia Crichton <triciac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736482}
parent 4acf59b6
...@@ -4,8 +4,16 @@ ...@@ -4,8 +4,16 @@
import httplib import httplib
import json import json
import os
import sys
from urlparse import urlparse from urlparse import urlparse
_THIS_DIR = os.path.abspath(os.path.dirname(__file__))
_PARENT_DIR = os.path.join(_THIS_DIR, os.pardir)
sys.path.insert(1, _PARENT_DIR)
import util
sys.path.remove(_PARENT_DIR)
class _Method(object): class _Method(object):
GET = 'GET' GET = 'GET'
POST = 'POST' POST = 'POST'
...@@ -199,8 +207,12 @@ class CommandExecutor(object): ...@@ -199,8 +207,12 @@ class CommandExecutor(object):
def __init__(self, server_url): def __init__(self, server_url):
self._server_url = server_url self._server_url = server_url
parsed_url = urlparse(server_url) parsed_url = urlparse(server_url)
timeout = 10
# see https://crbug.com/1045241: short timeout seems to introduce flakiness
if util.IsMac() or util.IsWindows():
timeout = 30
self._http_client = httplib.HTTPConnection( self._http_client = httplib.HTTPConnection(
parsed_url.hostname, parsed_url.port, timeout=10) parsed_url.hostname, parsed_url.port, timeout=timeout)
@staticmethod @staticmethod
def CreatePath(template_url_path, params): def CreatePath(template_url_path, params):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment