test.patch revision 2900
2810N/AVarious testing fixes:
2810N/A
2810N/A - Tests involving large (5GB+) bodies are mocked, but on 32-bit python,
2810N/A len() is limited to returning a ssize_t, which can represent 2GB.
2810N/A
2810N/A - Solaris doesn't yet support syslog logging to /dev/log.
2810N/A
2900N/AThe first, while potentially useful elsewhere, is really only an issue on
2900N/ASolaris because Linux runs almost exclusively 64-bit, which makes this a
2900N/Anon-issue. The last is Solaris-only -- though clearly a similar problem
2900N/Aexists on MacOS -- and we will want to fix this in our Python.
2810N/A
2810N/Adiff --git a/test/unit/__init__.py b/test/unit/__init__.py
2810N/A--- a/test/unit/__init__.py
2810N/A+++ b/test/unit/__init__.py
2900N/A@@ -450,7 +450,7 @@ def fake_http_connect(*code_iter, **kwar
2810N/A else:
2810N/A etag = '"68b329da9893e34099c7d8ad5cb9c940"'
2810N/A
2810N/A- headers = {'content-length': len(self.body),
2810N/A+ headers = {'content-length': self.body.__len__(),
2810N/A 'content-type': 'x-application/test',
2810N/A 'x-timestamp': self.timestamp,
2810N/A 'last-modified': self.timestamp,
2810N/Adiff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py
2810N/A--- a/test/unit/proxy/test_server.py
2810N/A+++ b/test/unit/proxy/test_server.py
2900N/A@@ -2876,6 +2876,9 @@ class TestObjectController(unittest.Test
2810N/A
2810N/A class LargeResponseBody(object):
2810N/A
2810N/A+ def __nonzero__(self):
2810N/A+ return True
2810N/A+
2810N/A def __len__(self):
2810N/A return MAX_FILE_SIZE + 1
2810N/A
2900N/A@@ -3006,6 +3009,9 @@ class TestObjectController(unittest.Test
2810N/A
2810N/A class LargeResponseBody(object):
2810N/A
2810N/A+ def __nonzero__(self):
2810N/A+ return True
2810N/A+
2810N/A def __len__(self):
2810N/A return MAX_FILE_SIZE + 1
2810N/A
2810N/Adiff --git a/test/unit/common/test_utils.py b/test/unit/common/test_utils.py
2810N/A--- a/test/unit/common/test_utils.py
2810N/A+++ b/test/unit/common/test_utils.py
2900N/A@@ -437,7 +437,8 @@ class TestUtils(unittest.TestCase):
2810N/A }, 'server', log_route='server')
2900N/A expected_args = [((), {'address': '/dev/log',
2900N/A 'facility': orig_sysloghandler.LOG_LOCAL3})]
2900N/A- if not os.path.exists('/dev/log') or \
2900N/A+ if sys.platform == 'sunos5' or \
2900N/A+ not os.path.exists('/dev/log') or \
2900N/A os.path.isfile('/dev/log') or \
2900N/A os.path.isdir('/dev/log'):
2900N/A # Since socket on OSX is in /var/run/syslog, there will be