diff options
author | Aldo Cortesi <aldo@corte.si> | 2016-06-14 17:11:41 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-14 17:11:41 +1200 |
commit | 04394ebd503fc26d9a4bcb201607b9dd3af157fa (patch) | |
tree | 9553d0f45e705da04bfa4be8dd5e39d09fcd112f /pathod | |
parent | d8ae2f156203a81a8e6d325f5c460c351cfbfc5c (diff) | |
parent | 93276d45be68790b5f4aeb4577c380ca1608efb3 (diff) | |
download | mitmproxy-04394ebd503fc26d9a4bcb201607b9dd3af157fa.tar.gz mitmproxy-04394ebd503fc26d9a4bcb201607b9dd3af157fa.tar.bz2 mitmproxy-04394ebd503fc26d9a4bcb201607b9dd3af157fa.zip |
Merge pull request #1251 from cortesi/netlibrace
Roll connect handlers and thread leak detection out in more of the netlib test suite
Diffstat (limited to 'pathod')
-rw-r--r-- | pathod/test.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/pathod/test.py b/pathod/test.py index 3ba541b1..4992945d 100644 --- a/pathod/test.py +++ b/pathod/test.py @@ -7,10 +7,6 @@ from . import pathod from netlib import basethread -class TimeoutError(Exception): - pass - - class Daemon: IFACE = "127.0.0.1" @@ -45,15 +41,7 @@ class Daemon: return self.logfp.getvalue() def wait_for_silence(self, timeout=5): - start = time.time() - while 1: - if time.time() - start >= timeout: - raise TimeoutError( - "%s service threads still alive" % - self.thread.server.handler_counter.count - ) - if self.thread.server.handler_counter.count == 0: - return + self.thread.server.wait_for_silence(timeout=timeout) def expect_log(self, n, timeout=5): l = [] |