mirror of
https://github.com/python/cpython.git
synced 2025-10-20 05:41:23 +00:00
bpo-39004: increment large sendfile() test timeout (GH-17552)
This commit is contained in:
parent
abdeb57a21
commit
82374979ec
1 changed files with 3 additions and 1 deletions
|
@ -9,6 +9,7 @@ import socket
|
||||||
import shutil
|
import shutil
|
||||||
import threading
|
import threading
|
||||||
from test.support import TESTFN, requires, unlink, bigmemtest, find_unused_port
|
from test.support import TESTFN, requires, unlink, bigmemtest, find_unused_port
|
||||||
|
from test.support import SHORT_TIMEOUT
|
||||||
import io # C implementation of io
|
import io # C implementation of io
|
||||||
import _pyio as pyio # Python 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')
|
@unittest.skipIf(not hasattr(os, 'sendfile'), 'sendfile not supported')
|
||||||
class TestSocketSendfile(LargeFileTest, unittest.TestCase):
|
class TestSocketSendfile(LargeFileTest, unittest.TestCase):
|
||||||
open = staticmethod(io.open)
|
open = staticmethod(io.open)
|
||||||
timeout = 3
|
timeout = SHORT_TIMEOUT
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super().setUp()
|
super().setUp()
|
||||||
|
@ -184,6 +185,7 @@ class TestSocketSendfile(LargeFileTest, unittest.TestCase):
|
||||||
def run(sock):
|
def run(sock):
|
||||||
with sock:
|
with sock:
|
||||||
conn, _ = sock.accept()
|
conn, _ = sock.accept()
|
||||||
|
conn.settimeout(self.timeout)
|
||||||
with conn, open(TESTFN2, 'wb') as f:
|
with conn, open(TESTFN2, 'wb') as f:
|
||||||
event.wait(self.timeout)
|
event.wait(self.timeout)
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue