summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2017-05-18 19:58:33 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2017-05-18 19:58:33 +0200
commit48da89ea4a6221ee5dc010aa14642319697f6073 (patch)
tree298e5276144cb9c2df21744bb9d149a164b5169f
parenta6617589f21510d5480b442d37378bb3721c03d2 (diff)
downloadpsutil-48da89ea4a6221ee5dc010aa14642319697f6073.tar.gz
skip failing connection tests on solaris
-rwxr-xr-xpsutil/tests/test_connections.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/psutil/tests/test_connections.py b/psutil/tests/test_connections.py
index aff3c8db..9390214e 100755
--- a/psutil/tests/test_connections.py
+++ b/psutil/tests/test_connections.py
@@ -199,6 +199,9 @@ class TestConnectedSocketPairs(Base, unittest.TestCase):
each other.
"""
+ # On SunOS, even after we close() it, the server socket stays around
+ # in TIME_WAIT state.
+ @unittest.skipIf(SUNOS, "unreliable on SUONS")
def test_tcp(self):
addr = ("127.0.0.1", get_free_port())
assert not thisproc.connections(kind='tcp4')
@@ -352,7 +355,7 @@ class TestConnectedSocketPairs(Base, unittest.TestCase):
def test_multi_sockets_filtering(self):
with create_sockets() as socks:
cons = thisproc.connections(kind='all')
- self.assertEqual(len(socks), len(cons))
+ self.assertEqual(len(cons), len(socks))
# tcp
cons = thisproc.connections(kind='tcp')
self.assertEqual(len(cons), 2 if supports_ipv6() else 1)