Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Increase monitoring system test backoff
  • Loading branch information
liyanhui1228 committed Aug 8, 2017
commit c2a8f0035c56f8afe55f48945acf9dc49f84744a
13 changes: 9 additions & 4 deletions monitoring/tests/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,19 @@ def test_write_point(self):
retry_500(client.write_point)(metric, resource, VALUE)

def _query_timeseries_with_retries():
MAX_RETRIES = 10
MAX_RETRIES = 6

def _has_timeseries(result):
return len(list(result)) > 0

retry_result = RetryResult(_has_timeseries,
max_tries=MAX_RETRIES)(client.query)
return RetryErrors(BadRequest, max_tries=MAX_RETRIES)(retry_result)
retry_result = RetryResult(
_has_timeseries,
max_tries=MAX_RETRIES,
backoff=3)(client.query)
return RetryErrors(
BadRequest,
max_tries=MAX_RETRIES,
backoff=3)(retry_result)

query = _query_timeseries_with_retries()(METRIC_TYPE, minutes=5)
timeseries_list = list(query)
Expand Down