https://github.com/python/cpython/commit/9fd420f53d1b1087d2ae648b0efc44107d27d867
commit: 9fd420f53d1b1087d2ae648b0efc44107d27d867
branch: main
author: Peter Jiping Xie <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2024-02-17T09:12:12Z
summary:
gh-101384: Add socket timeout to ThreadedVSOCKSocketStreamTest and skip it on
WSL (GH-101419)
files:
M Lib/test/test_socket.py
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 17964234992062..b936e9ae91daca 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -46,6 +46,7 @@
VSOCKPORT = 1234
AIX = platform.system() == "AIX"
+WSL = "microsoft-standard-WSL" in platform.release()
try:
import _socket
@@ -510,6 +511,7 @@ def clientTearDown(self):
ThreadableTest.clientTearDown(self)
@unittest.skipIf(fcntl is None, "need fcntl")
[email protected](WSL, 'VSOCK does not work on Microsoft WSL')
@unittest.skipUnless(HAVE_SOCKET_VSOCK,
'VSOCK sockets required for this test.')
@unittest.skipUnless(get_cid() != 2,
@@ -526,6 +528,7 @@ def setUp(self):
self.serv.bind((socket.VMADDR_CID_ANY, VSOCKPORT))
self.serv.listen()
self.serverExplicitReady()
+ self.serv.settimeout(support.LOOPBACK_TIMEOUT)
self.conn, self.connaddr = self.serv.accept()
self.addCleanup(self.conn.close)
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]