8000 gh-109706: Fix multiprocessing test_nested_startmethod() (GH-109707) · python/cpython@a83132f · GitHub
[go: up one dir, main page]

Skip to content

Commit a83132f

Browse files
vstinnermiss-islington
authored andcommitted
gh-109706: Fix multiprocessing test_nested_startmethod() (GH-109707)
Don't check order, queue items can be written in any order. (cherry picked from commit b03a791) Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent f6287bd commit a83132f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/_test_multiprocessing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5434,7 +5434,9 @@ def test_nested_startmethod(self):
54345434
while not queue.empty():
54355435
results.append(queue.get())
54365436

5437-
self.assertEqual(results, [2, 1])
5437+
# gh-109706: queue.put(1) can write into the queue before queue.put(2),
5438+
# there is no synchronization in the test.
5439+
self.assertSetEqual(set(results), set([2, 1]))
54385440

54395441

54405442
@unittest.skipIf(sys.platform == "win32",

0 commit comments

Comments
 (0)
0