test_cotyledon.py 文件源码

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

项目:deb-python-cotyledon 作者: openstack 项目源码 文件源码
def test_sigkill(self):
        self.assert_everything_has_started()
        self.subp.kill()
        time.sleep(0.5)
        lines = sorted(self.get_lines())
        lines = self.hide_pids(lines)
        self.assertEqual([
            b'ERROR:cotyledon.tests.examples:heavy terminate',
            b'ERROR:cotyledon.tests.examples:heavy terminate',
            b'INFO:cotyledon:Caught SIGTERM signal, graceful exiting of '
            b'service heavy(0) [XXXX]',
            b'INFO:cotyledon:Caught SIGTERM signal, graceful exiting of '
            b'service heavy(1) [XXXX]',
            b'INFO:cotyledon:Caught SIGTERM signal, graceful exiting of '
            b'service light(0) [XXXX]',
            b'INFO:cotyledon:Parent process has died unexpectedly, '
            b'heavy(0) [XXXX] exiting',
            b'INFO:cotyledon:Parent process has died unexpectedly, '
            b'heavy(1) [XXXX] exiting',
            b'INFO:cotyledon:Parent process has died unexpectedly, '
            b'light(0) [XXXX] exiting',
        ], lines)
        self.assert_everything_is_dead(-9)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号