def test_elasticsearch_running(es):
i = 0
while i < 5:
try:
es.ping()
assert True
return
except ConnectionError:
i += 1
sleep(2)
pytest.fail('Elasticsearch not running (failed to connect after {} tries)'
.format(str(i)))
test_elasticsearch_driver.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录