diff options
| author | Jakub Stasiak <jakub@stasiak.at> | 2013-07-29 23:40:03 +0100 |
|---|---|---|
| committer | Sergey Shepelev <temotor@gmail.com> | 2013-08-07 18:25:23 +0400 |
| commit | dfc08f79471c588bcfb8e217194f08e80c193858 (patch) | |
| tree | 1b792952325b3a9e33c728445ca5326b27a8b433 /tests/__init__.py | |
| parent | 5e40ef4bc388036009d07a2edcbbfa9fc3976921 (diff) | |
| download | eventlet-dfc08f79471c588bcfb8e217194f08e80c193858.tar.gz | |
tests: kill all tpool workers in LimitedTestCase
Fixes GH-41 https://github.com/eventlet/eventlet/issues/41
Diffstat (limited to 'tests/__init__.py')
| -rw-r--r-- | tests/__init__.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/__init__.py b/tests/__init__.py index 43e558a..9fbfaf4 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -12,7 +12,7 @@ import unittest import warnings import eventlet -from eventlet import debug, hubs +from eventlet import debug, hubs, tpool # convenience for importers @@ -178,15 +178,8 @@ class LimitedTestCase(unittest.TestCase): signal.signal(signal.SIGALRM, self.previous_alarm[0]) signal.alarm(self.previous_alarm[1]) - try: - hub = hubs.get_hub() - num_readers = len(hub.get_readers()) - num_writers = len(hub.get_writers()) - assert num_readers == num_writers == 0 - except AssertionError: - print "ERROR: Hub not empty" - print debug.format_hub_timers() - print debug.format_hub_listeners() + tpool.killall() + verify_hub_empty() def assert_less_than(self, a,b,msg=None): if msg: |
