Skip to content

Commit 3db2ec2

Browse files
[3.11] gh-109706: Fix multiprocessing test_nested_startmethod() (GH-109707) (#109763)
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 <[email protected]>
1 parent 6bb18bb commit 3db2ec2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/_test_multiprocessing.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -5396,7 +5396,9 @@ def test_nested_startmethod(self):
53965396
while not queue.empty():
53975397
results.append(queue.get())
53985398

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

54015403

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

0 commit comments

Comments
 (0)