Skip to content

Commit

Permalink
pythongh-109706: Fix multiprocessing test_nested_startmethod()
Browse files Browse the repository at this point in the history
Don't check order, queue items can be written in any order.
  • Loading branch information
vstinner committed Sep 22, 2023
1 parent 4230d7c commit 85c918b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5472,7 +5472,9 @@ def test_nested_startmethod(self):
while not queue.empty():
results.append(queue.get())

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


@unittest.skipIf(sys.platform == "win32",
Expand Down

0 comments on commit 85c918b

Please sign in to comment.