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:
Alexander Kukushkin
2020-07-31 15:43:50 +02:00
committed by GitHub
parent d4c6987f78
commit f1c6b0bebe
6 changed files with 29 additions and 17 deletions
+4 -3
View File
@@ -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())