From 85475b2fbd975bab54d69e7b6cf5c489f01c15e6 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Mon, 19 Aug 2013 15:50:03 -0700 Subject: [PATCH] Run a more GC iterations to make sure weakrefs are collected This is needed to make sure the weakref callback is fired under PyPy. Change-Id: I5d1b83186780ee6130463fe42fac58e411ad9f79 --- test/unit/proxy/test_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py index c3202a9059..ac75e723fc 100644 --- a/test/unit/proxy/test_server.py +++ b/test/unit/proxy/test_server.py @@ -4394,7 +4394,7 @@ class TestObjectController(unittest.TestCase): self.assertEqual(headers[:len(exp)], exp) # Remember Request instance count, make sure the GC is run for pythons # without reference counting. - for i in xrange(3): + for i in xrange(4): gc.collect() before_request_instances = len(_request_instances) # GET test file, but disconnect early @@ -4413,7 +4413,7 @@ class TestObjectController(unittest.TestCase): fd.close() sock.close() # Make sure the GC is run again for pythons without reference counting - for i in xrange(3): + for i in xrange(4): gc.collect() self.assertEquals(before_request_instances, len(_request_instances))