diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index 044bfc97b8c666..bf5d541af896ca 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -5434,7 +5434,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 write 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",