diff --git a/patroni/callback_executor.py b/patroni/callback_executor.py index 4764cae1..2d00b64c 100644 --- a/patroni/callback_executor.py +++ b/patroni/callback_executor.py @@ -24,8 +24,6 @@ class CallbackExecutor(Thread): logger.warning('Killed the old callback process because it was still running: %s', self._cmd) except OSError: logger.exception('Failed to kill the old callback') - logger.warning('Wait until callback end') - self._process.wait() self._cmd = cmd self._callback_event.set() diff --git a/tests/test_callback_executor.py b/tests/test_callback_executor.py index fc4a95c2..1b9a01a5 100644 --- a/tests/test_callback_executor.py +++ b/tests/test_callback_executor.py @@ -18,7 +18,7 @@ class TestCallbackExecutor(unittest.TestCase): self.assertIsNone(ce.call([])) mock_popen.return_value.kill.side_effect = OSError - self.assertRaises(Exception, ce.call, []) + self.assertIsNone(ce.call([])) mock_popen.side_effect = Exception ce = CallbackExecutor()