pact.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:pact-python 作者: pact-foundation 项目源码 文件源码
def _wait_for_server_start(self):
        """
        Wait for the mock service to be ready for requests.

        :rtype: None
        :raises RuntimeError: If there is a problem starting the mock service.
        """
        s = requests.Session()
        retries = Retry(total=15, backoff_factor=0.1)
        s.mount('http://', HTTPAdapter(max_retries=retries))
        resp = s.get(self.uri, headers=self.HEADERS)
        if resp.status_code != 200:
            self._process.terminate()
            self._process.communicate()
            raise RuntimeError(
                'There was a problem starting the mock service: %s', resp.text)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号