From 328bdb73bc2237d6d8170b555562ce43d7025e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Mon, 2 Nov 2015 16:01:48 +0100 Subject: [PATCH] Longer timeout for the test client to fix travis CI --- elasticsearch/helpers/test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/elasticsearch/helpers/test.py b/elasticsearch/helpers/test.py index 06dc86c6..2abf473d 100644 --- a/elasticsearch/helpers/test.py +++ b/elasticsearch/helpers/test.py @@ -9,13 +9,14 @@ except ImportError: from elasticsearch import Elasticsearch from elasticsearch.exceptions import ConnectionError -def get_test_client(nowait=False): +def get_test_client(nowait=False, **kwargs): # construct kwargs from the environment - kw = {} + kw = {'timeout': 30} if 'TEST_ES_CONNECTION' in os.environ: from elasticsearch import connection kw['connection_class'] = getattr(connection, os.environ['TEST_ES_CONNECTION']) + kw.update(kwargs) client = Elasticsearch([os.environ.get('TEST_ES_SERVER', {})], **kw) # wait for yellow status