summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-07-24 22:11:41 -0700
committerGitHub <noreply@github.com>2022-07-24 22:11:41 -0700
commit40f41ba5f4f27a5e0949108286320c2057541643 (patch)
treed92e7758632230eab717a4ea8f874e6e425a0c3c
parent6d332a6cfa371cdb45c180b3da72d491569b2b02 (diff)
downloadcpython-git-40f41ba5f4f27a5e0949108286320c2057541643.tar.gz
gh-95212: make multiprocessing test case parallel-safe (GH-95213)
(cherry picked from commit 5956de16cd00e7e1cf5cbf3d7b4a930eaa928321) Co-authored-by: Christian Heimes <christian@python.org>
-rw-r--r--Lib/test/_test_multiprocessing.py2
-rw-r--r--Misc/NEWS.d/next/Tests/2022-07-24-20-19-05.gh-issue-95212.fHiU4e.rst2
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index de1a99a272..8dced90c53 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -3910,7 +3910,7 @@ class _TestSharedMemory(BaseTestCase):
'multiprocessing.shared_memory._make_filename') as mock_make_filename:
NAME_PREFIX = shared_memory._SHM_NAME_PREFIX
- names = ['test01_fn', 'test02_fn']
+ names = [self._new_shm_name('test03_fn'), self._new_shm_name('test04_fn')]
# Prepend NAME_PREFIX which can be '/psm_' or 'wnsm_', necessary
# because some POSIX compliant systems require name to start with /
names = [NAME_PREFIX + name for name in names]
diff --git a/Misc/NEWS.d/next/Tests/2022-07-24-20-19-05.gh-issue-95212.fHiU4e.rst b/Misc/NEWS.d/next/Tests/2022-07-24-20-19-05.gh-issue-95212.fHiU4e.rst
new file mode 100644
index 0000000000..44cea181cc
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2022-07-24-20-19-05.gh-issue-95212.fHiU4e.rst
@@ -0,0 +1,2 @@
+Make multiprocessing test case ``test_shared_memory_recreate``
+parallel-safe.