Created
December 5, 2013 19:09
-
-
Save portante/7811356 to your computer and use it in GitHub Desktop.
An alternative to https://review.openstack.org/60302/1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py | |
| index a25684b..c960892 100644 | |
| --- a/test/unit/proxy/test_server.py | |
| +++ b/test/unit/proxy/test_server.py | |
| @@ -4655,7 +4655,10 @@ class TestObjectController(unittest.TestCase): | |
| # Remember Request instance count, make sure the GC is run for pythons | |
| # without reference counting. | |
| for i in xrange(4): | |
| + sleep(0) # let eventlet do it's thing | |
| gc.collect() | |
| + else: | |
| + sleep(0) | |
| before_request_instances = len(_request_instances) | |
| # GET test file, but disconnect early | |
| sock = connect_tcp(('localhost', prolis.getsockname()[1])) | |
| @@ -4672,11 +4675,12 @@ class TestObjectController(unittest.TestCase): | |
| fd.read(1) | |
| fd.close() | |
| sock.close() | |
| - sleep(0) # let eventlet do it's thing | |
| # Make sure the GC is run again for pythons without reference counting | |
| for i in xrange(4): | |
| + sleep(0) # let eventlet do it's thing | |
| gc.collect() | |
| - sleep() | |
| + else: | |
| + sleep(0) | |
| self.assertEquals(before_request_instances, len(_request_instances)) | |
| def test_OPTIONS(self): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment