]> granicus.if.org Git - python/commit
bpo-33735: Fix test_multiprocessing random failure (GH-8059)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 3 Jul 2018 11:38:56 +0000 (04:38 -0700)
committerGitHub <noreply@github.com>
Tue, 3 Jul 2018 11:38:56 +0000 (04:38 -0700)
commit42b2f84a85fe3334c5d8098cf76dfa727b348c4f
tree733f2d5ea066541f430e2d5df30b312b16388eb7
parent4d02ad856f123d68712f542d55e8ff3393f00a8f
bpo-33735: Fix test_multiprocessing random failure (GH-8059)

When hunting memory leaks using -R 3:3, test_imap_unordered() of
test_multiprocessing leaks randomly a few memory blocks. It is a
false alarm: when testing using -R 3:20 for example, no leak is
detected.

Modify test_imap_unordered() to be closer to test_imap():

* Only test 10 numbers instead of 1000: it's a pool of 4 processes, so
  10 is enough to test at least one number per process
* Use chunksize=100 instead of chunksize=53 to mimick test_imap()
(cherry picked from commit 23401fb960bb94e6ea62d2999527968d53d3fc65)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Lib/test/_test_multiprocessing.py