diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2019-12-10 09:31:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-10 09:31:06 (GMT) |
commit | 82374979ec7e01e23385dca1d02b2aa3de16fea5 (patch) | |
tree | e0fb0068f4859ec3cd8041f87a67c4d90e436a05 | |
parent | abdeb57a212556b4cd3568cca7d316d71a5b8cf0 (diff) | |
download | cpython-82374979ec7e01e23385dca1d02b2aa3de16fea5.zip cpython-82374979ec7e01e23385dca1d02b2aa3de16fea5.tar.gz cpython-82374979ec7e01e23385dca1d02b2aa3de16fea5.tar.bz2 |
bpo-39004: increment large sendfile() test timeout (GH-17552)
-rw-r--r-- | Lib/test/test_largefile.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_largefile.py b/Lib/test/test_largefile.py index 6c8813e..e309282 100644 --- a/Lib/test/test_largefile.py +++ b/Lib/test/test_largefile.py @@ -9,6 +9,7 @@ import socket 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 @@ -168,7 +169,7 @@ class TestCopyfile(LargeFileTest, unittest.TestCase): @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() @@ -184,6 +185,7 @@ class TestSocketSendfile(LargeFileTest, unittest.TestCase): 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: |