Rest api thread can raise an exception during shutdown (#711)

catch it and report
This commit is contained in:
Alexander Kukushkin
2018-06-14 13:17:50 +02:00
committed by GitHub
parent 41e5f58f2b
commit 8a3b78ca7b
2 changed files with 8 additions and 1 deletions
+4
View File
@@ -151,3 +151,7 @@ class TestPatroni(unittest.TestCase):
self.assertTrue(self.p.nosync)
self.p.tags['nosync'] = None
self.assertFalse(self.p.nosync)
def test_shutdown(self):
self.p.api.shutdown = Mock(side_effect=Exception)
self.p.shutdown()