diff options
author | Hai Shi <shihai1992@gmail.com> | 2020-05-04 15:05:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 15:05:54 (GMT) |
commit | caa3ef284a2e5e5b9bdd6a9e619804122c842d80 (patch) | |
tree | c61bf4e0f99ecde28cdedbc598c489fb7b08fe8e /Lib/test/_test_multiprocessing.py | |
parent | b88cd585d36d6285a5aeb0b6fdb70c134062181e (diff) | |
download | cpython-caa3ef284a2e5e5b9bdd6a9e619804122c842d80.zip cpython-caa3ef284a2e5e5b9bdd6a9e619804122c842d80.tar.gz cpython-caa3ef284a2e5e5b9bdd6a9e619804122c842d80.tar.bz2 |
bpo-40135: Fix multiprocessing test_shared_memory_across_processes() (GH-19892)
Don't define shared memory block's name in test_shared_memory_across_processes():
use SharedMemory(create=True) instead.
Diffstat (limited to 'Lib/test/_test_multiprocessing.py')
-rw-r--r-- | Lib/test/_test_multiprocessing.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index dd894f2..dc8164f 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -3860,7 +3860,9 @@ class _TestSharedMemory(BaseTestCase): sms.close() def test_shared_memory_across_processes(self): - sms = shared_memory.SharedMemory('test02_tsmap', True, size=512) + # bpo-40135: don't define shared memory block's name in case of + # the failure when we run multiprocessing tests in parallel. + sms = shared_memory.SharedMemory(create=True, size=512) self.addCleanup(sms.unlink) # Verify remote attachment to existing block by name is working. |