test_paas_spark.py 文件源码

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

项目:integration-prototype 作者: SKA-ScienceDataProcessor 项目源码 文件源码
def setUpClass(cls):
        """ Set up test fixture.

        Skip the tests if it is not possible to connect to the Spark Master.
        """
        paas = SparkPaaS()
        try:
            master_url = "http://{}:{}".format(
                paas.spark_master['url'], paas.spark_master['master_port'])
            req = requests.get(master_url)
            if not req.ok:
                raise unittest.SkipTest('No 200 response from Spark Master '
                                        '@[{}], Skipping tests.'.
                                        format(master_url))
        except requests.exceptions.RequestException:
            print('Exception thrown..')
            raise unittest.SkipTest("Cannot connect to Spark Master @ [{}]. "
                                    "Skipping tests.". format(master_url))
        cls.paas = paas
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号