Skip to content

Commit 8237497

Browse files
authoredDec 10, 2019
bpo-39004: increment large sendfile() test timeout (pythonGH-17552)
1 parent abdeb57 commit 8237497

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎Lib/test/test_largefile.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import shutil
1010
import threading
1111
from test.support import TESTFN, requires, unlink, bigmemtest, find_unused_port
12+
from test.support import SHORT_TIMEOUT
1213
import io # C implementation of io
1314
import _pyio as pyio # Python implementation of io
1415

@@ -168,7 +169,7 @@ def test_it(self):
168169
@unittest.skipIf(not hasattr(os, 'sendfile'), 'sendfile not supported')
169170
class TestSocketSendfile(LargeFileTest, unittest.TestCase):
170171
open = staticmethod(io.open)
171-
timeout = 3
172+
timeout = SHORT_TIMEOUT
172173

173174
def setUp(self):
174175
super().setUp()
@@ -184,6 +185,7 @@ def tcp_server(self, sock):
184185
def run(sock):
185186
with sock:
186187
conn, _ = sock.accept()
188+
conn.settimeout(self.timeout)
187189
with conn, open(TESTFN2, 'wb') as f:
188190
event.wait(self.timeout)
189191
while True:

0 commit comments

Comments
 (0)
Please sign in to comment.