commit b40029c8e34069e80612439e2716b6b1bd81d6cf Author: Damian Johnson atagar@torproject.org Date: Thu Jul 27 09:31:03 2017 -0700
Better output for failing connection tests
Presently a test for sockstat is failing on our jenkins automated tests. This isn't a fix for that, but this does fix the failure handling which is masking the issue...
====================================================================== ERROR: test_connections_by_sockstat ---------------------------------------------------------------------- Traceback (most recent call last): File "/srv/jenkins-workspace/workspace/stem-tor-ci/test/integ/util/connection.py", line 51, in test_connections_by_sockstat self.check_resolver(Resolver.SOCKSTAT) File "/srv/jenkins-workspace/workspace/stem-tor-ci/test/require.py", line 58, in wrapped return func(self, *args, **kwargs) File "/srv/jenkins-workspace/workspace/stem-tor-ci/test/integ/util/connection.py", line 33, in check_resolver self.fail('Unable to find localhost connection with %s:\n%s' % (resolver, '\n'.join(connections))) TypeError: sequence item 0: expected string, Connection found --- test/integ/util/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/integ/util/connection.py b/test/integ/util/connection.py index 9f2a9aeb..563cfbeb 100644 --- a/test/integ/util/connection.py +++ b/test/integ/util/connection.py @@ -30,7 +30,7 @@ class TestConnection(unittest.TestCase): if conn.local_address == '127.0.0.1' and conn.local_port == test.runner.CONTROL_PORT: return
- self.fail('Unable to find localhost connection with %s:\n%s' % (resolver, '\n'.join(connections))) + self.fail('Unable to find localhost connection with %s:\n%s' % (resolver, '\n'.join(map(str, connections))))
def test_connections_by_proc(self): self.check_resolver(Resolver.PROC)
tor-commits@lists.torproject.org