Repository: couchdb Updated Branches: refs/heads/master 9e2010afe -> eb18a69ee
Do panic when no more retries left Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/eb18a69e Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/eb18a69e Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/eb18a69e Branch: refs/heads/master Commit: eb18a69eebcc94e62a2a7dd26b9395020f8d4ecd Parents: 9e2010a Author: Alexander Shorin <kxe...@apache.org> Authored: Wed Oct 7 13:51:04 2015 +0300 Committer: Alexander Shorin <kxe...@apache.org> Committed: Wed Oct 7 13:51:04 2015 +0300 ---------------------------------------------------------------------- dev/run | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/eb18a69e/dev/run ---------------------------------------------------------------------- diff --git a/dev/run b/dev/run index 4f4c492..4017167 100755 --- a/dev/run +++ b/dev/run @@ -481,8 +481,10 @@ def try_request(host, port, meth, path, success_codes, retries=10, retry_dt=1): conn = httpclient.HTTPConnection(host, port) conn.request(meth, path) resp = conn.getresponse() - if resp.status in success_codes or retries == 0: + if resp.status in success_codes: return resp.status, resp.read() + elif retries <= 0: + assert resp.status in success_codes, resp.read() retries -= 1 time.sleep(retry_dt)