summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py27
1 files changed, 0 insertions, 27 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 4f3c477..f4d58eb 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -2054,33 +2054,6 @@ class RDSTest(ThreadedRDSSocketTest):
self.data = b'select'
self.cli.sendto(self.data, 0, (HOST, self.port))
- def testCongestion(self):
- # wait until the sender is done
- self.evt.wait()
-
- def _testCongestion(self):
- # test the behavior in case of congestion
- self.data = b'fill'
- self.cli.setblocking(False)
- try:
- # try to lower the receiver's socket buffer size
- self.cli.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 16384)
- except OSError:
- pass
- with self.assertRaises(OSError) as cm:
- try:
- # fill the receiver's socket buffer
- while True:
- self.cli.sendto(self.data, 0, (HOST, self.port))
- finally:
- # signal the receiver we're done
- self.evt.set()
- # sendto() should have failed with ENOBUFS
- self.assertEqual(cm.exception.errno, errno.ENOBUFS)
- # and we should have received a congestion notification through poll
- r, w, x = select.select([self.serv], [], [], 3.0)
- self.assertIn(self.serv, r)
-
@unittest.skipIf(fcntl is None, "need fcntl")
@unittest.skipUnless(HAVE_SOCKET_VSOCK,