Skip to content

Commit

Permalink
bpo-39004: increment large sendfile() test timeout (GH-17552)
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Dec 10, 2019
1 parent abdeb57 commit 8237497
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lib/test/test_largefile.py
Expand Up @@ -9,6 +9,7 @@
import shutil
import threading
from test.support import TESTFN, requires, unlink, bigmemtest, find_unused_port
from test.support import SHORT_TIMEOUT
import io # C implementation of io
import _pyio as pyio # Python implementation of io

Expand Down Expand Up @@ -168,7 +169,7 @@ def test_it(self):
@unittest.skipIf(not hasattr(os, 'sendfile'), 'sendfile not supported')
class TestSocketSendfile(LargeFileTest, unittest.TestCase):
open = staticmethod(io.open)
timeout = 3
timeout = SHORT_TIMEOUT

def setUp(self):
super().setUp()
Expand All @@ -184,6 +185,7 @@ def tcp_server(self, sock):
def run(sock):
with sock:
conn, _ = sock.accept()
conn.settimeout(self.timeout)
with conn, open(TESTFN2, 'wb') as f:
event.wait(self.timeout)
while True:
Expand Down

0 comments on commit 8237497

Please sign in to comment.