This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients corona10, vstinner
Date 2020-08-12.13:45:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Oh, by design, NetworkConnectionNoServer.test_create_connection() has a race condition:

        port = socket_helper.find_unused_port()
        with self.assertRaises(OSError) as cm:
            socket.create_connection((HOST, port))

If another process starts to listen to the "unused" port between find_unused_port() call and the create_connection() call, create_connection() succeed and the test fails.

Maybe I should just add a comment mentioning the race condition. Or we should find a more reliable way to get an error.
Date User Action Args
2020-08-12 13:45:14vstinnersetrecipients: + vstinner, corona10
2020-08-12 13:45:14vstinnersetmessageid: <>
2020-08-12 13:45:14vstinnerlinkissue40949 messages
2020-08-12 13:45:14vstinnercreate