mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Windows compatibility fixes (#1633)
* pg_rewind error messages contain '/' as directory separator * fix Raft unit tests on win * fix validator unit tests on win * fix keepalive unit tests on win * make standby cluster behave tests less shaky
This commit is contained in:
+4
-3
@@ -36,9 +36,10 @@ class TestUtils(unittest.TestCase):
|
||||
def test_enable_keepalive(self):
|
||||
with patch('socket.SIO_KEEPALIVE_VALS', 1, create=True):
|
||||
self.assertIsNotNone(enable_keepalive(Mock(), 10, 5))
|
||||
for platform in ('linux2', 'darwin', 'other'):
|
||||
with patch('sys.platform', platform):
|
||||
self.assertIsNone(enable_keepalive(Mock(), 10, 5))
|
||||
with patch('socket.SIO_KEEPALIVE_VALS', None, create=True):
|
||||
for platform in ('linux2', 'darwin', 'other'):
|
||||
with patch('sys.platform', platform):
|
||||
self.assertIsNone(enable_keepalive(Mock(), 10, 5))
|
||||
|
||||
|
||||
@patch('time.sleep', Mock())
|
||||
|
||||
Reference in New Issue
Block a user