Merge pull request #12934 from athanatos/wip-18529

test/pybind/test_rados.py: tolerate TimedOut in test_ping_monitor

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
This commit is contained in:
Josh Durgin 2017-01-26 15:14:45 -08:00 committed by GitHub
commit 2ebea511ed

View File

@ -144,7 +144,10 @@ class TestRados(object):
ret, buf, out = self.rados.mon_command(json.dumps(cmd), b'')
for mon in json.loads(buf.decode('utf8'))['mons']:
while True:
buf = json.loads(self.rados.ping_monitor(mon['name']))
output = self.rados.ping_monitor(mon['name'])
if output is None:
continue
buf = json.loads(output)
if buf.get('health'):
break