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)
评论列表
文章目录