Skip to content

Commit b03a791

Browse files
authored
gh-109706: Fix multiprocessing test_nested_startmethod() (#109707)
Don't check order, queue items can be written in any order.
1 parent d5611f2 commit b03a791

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
@@ -5472,7 +5472,9 @@ def test_nested_startmethod(self):
54725472
while not queue.empty():
54735473
results.append(queue.get())
54745474

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

54775479

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

0 commit comments

Comments
 (0)