[Python-checkins] bpo-33532: Fix multiprocessing test_ignore() (GH-7262)
Miss Islington (bot)
webhook-mailer at python.org
Wed May 30 23:28:09 EDT 2018
https://github.com/python/cpython/commit/9d273344238330d634acb4a7d427a8fb732ae62e
commit: 9d273344238330d634acb4a7d427a8fb732ae62e
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-05-30T20:28:04-07:00
summary:
bpo-33532: Fix multiprocessing test_ignore() (GH-7262)
Fix test_ignore() of multiprocessing tests like
test_multiprocessing_forkserver: use support.PIPE_MAX_SIZE to make
sure that send_bytes() blocks.
(cherry picked from commit 5d6c7ed5e340b2311a15f34e968d4bef09c71922)
Co-authored-by: Victor Stinner <vstinner at redhat.com>
files:
M Lib/test/_test_multiprocessing.py
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index aa8eb7564130..f29dda70029b 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -4303,7 +4303,7 @@ def handler(signum, frame):
conn.send('ready')
x = conn.recv()
conn.send(x)
- conn.send_bytes(b'x' * (1024 * 1024)) # sending 1 MiB should block
+ conn.send_bytes(b'x' * support.PIPE_MAX_SIZE)
@unittest.skipUnless(hasattr(signal, 'SIGUSR1'), 'requires SIGUSR1')
def test_ignore(self):
@@ -4322,7 +4322,7 @@ def test_ignore(self):
self.assertEqual(conn.recv(), 1234)
time.sleep(0.1)
os.kill(p.pid, signal.SIGUSR1)
- self.assertEqual(conn.recv_bytes(), b'x'*(1024*1024))
+ self.assertEqual(conn.recv_bytes(), b'x' * support.PIPE_MAX_SIZE)
time.sleep(0.1)
p.join()
finally:
More information about the Python-checkins
mailing list