aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-11 19:52:24 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-11 19:52:24 +1200
commit09edbd9492e59c0c8dcae69b4b1f4b745867abe4 (patch)
treee9cf29c394334c02d908058c2c5e159715d3e3c3 /test
parent5b9f07c81c0dcc8c7b3d7afdeae8f6229ebf8622 (diff)
downloadmitmproxy-09edbd9492e59c0c8dcae69b4b1f4b745867abe4.tar.gz
mitmproxy-09edbd9492e59c0c8dcae69b4b1f4b745867abe4.tar.bz2
mitmproxy-09edbd9492e59c0c8dcae69b4b1f4b745867abe4.zip
Improve debugging of thread and other leaks
- Add basethread.BaseThread that all threads outside of test suites should use - Add a signal handler to mitmproxy, mitmdump and mitmweb that dumps resource information to screen when SIGUSR1 is received. - Improve thread naming throughout to make thread dumps understandable
Diffstat (limited to 'test')
-rw-r--r--test/netlib/test_debug.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/netlib/test_debug.py b/test/netlib/test_debug.py
index d174bb5f..c39d3752 100644
--- a/test/netlib/test_debug.py
+++ b/test/netlib/test_debug.py
@@ -1,6 +1,14 @@
+from __future__ import (absolute_import, print_function, division)
+from six.moves import cStringIO as StringIO
from netlib import debug
+def test_dump_info():
+ cs = StringIO()
+ debug.dump_info(None, None, file=cs)
+ assert cs.getvalue()
+
+
def test_sysinfo():
assert debug.sysinfo()