From 1873db442dc7511fc2c92fbaeb8d998d3e62723d Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 11 Jun 2010 16:25:27 +0200 Subject: Improved shutdown handling - although its impossible to prevent some stderr printing thanks to the underlying threading implementation, we can at least make sure that the interpreter doesn't block during shutdown. Now it appears to be running smoothly --- test/git/async/test_pool.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'test/git/async/test_pool.py') diff --git a/test/git/async/test_pool.py b/test/git/async/test_pool.py index 40c6d66e..c786770a 100644 --- a/test/git/async/test_pool.py +++ b/test/git/async/test_pool.py @@ -373,10 +373,7 @@ class TestThreadPool(TestBase): - - # for some reason, sometimes it has multiple workerthreads already when he - # enters the method ... dunno yet, pools should clean up themselvess - #@terminate_threads + @terminate_threads def test_base(self): assert len(threading.enumerate()) == 1 @@ -463,10 +460,11 @@ class TestThreadPool(TestBase): # threads per core p.set_size(4) self._assert_single_task(p, True) + + # DEPENDENT TASK ASYNC MODE ########################### self._assert_async_dependent_tasks(p) print >> sys.stderr, "Done with everything" - # TODO: test multi-pool connections -- cgit v1.2.1 From e14e3f143e7260de9581aee27e5a9b2645db72de Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 11 Jun 2010 16:42:09 +0200 Subject: Removed commented-out debug code and additional debug printings. Verified it works on py2.4, 2.5 and 2.6 --- test/git/async/test_pool.py | 1 - 1 file changed, 1 deletion(-) (limited to 'test/git/async/test_pool.py') diff --git a/test/git/async/test_pool.py b/test/git/async/test_pool.py index c786770a..0042c4a8 100644 --- a/test/git/async/test_pool.py +++ b/test/git/async/test_pool.py @@ -19,7 +19,6 @@ class TestThreadPool(TestBase): def _assert_single_task(self, p, async=False): """Performs testing in a synchronized environment""" - # return # DEBUG TODO: Fixme deactivated it print >> sys.stderr, "Threadpool: Starting single task (async = %i) with %i threads" % (async, p.size()) null_tasks = p.num_tasks() # in case we had some before -- cgit v1.2.1