Fix a typo and call sys.exit on sigterm

otherwise it will wait up to `loop_wait` seconds berfore exiting...
This commit is contained in:
Alexander Kukushkin
2016-06-16 15:19:21 +02:00
parent 69099b060e
commit bd5440a102
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ class TestPatroni(unittest.TestCase):
self.assertRaises(SleepException, self.p.run)
def test_sigterm_handler(self):
self.p.sigterm_handler()
self.assertRaises(SystemExit, self.p.sigterm_handler)
def test_schedule_next_run(self):
self.p.ha.dcs.watch = Mock(return_value=True)