From b332e3e436e780ee5ff14e9b6fe3c75d9e155db3 Mon Sep 17 00:00:00 2001 From: gholt Date: Thu, 5 Dec 2013 18:02:06 +0000 Subject: [PATCH] Fixed a failing test on my saio The added sleep makes this test pass on my saio. I have not heard of it failing for anyone else, but I figured I'd post this up just in case someone does have the same problem and this fixes it for them. Change-Id: Ia0bb09d36d0b531ade7c6a6034bbe31dd6c90a98 --- test/unit/proxy/test_server.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py index f6f587113a..883a06025b 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 its 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,10 +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 its thing gc.collect() + else: + sleep(0) self.assertEquals(before_request_instances, len(_request_instances)) def test_OPTIONS(self):