Message375243
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:14 | vstinner | set | recipients:
+ vstinner, corona10 |
2020-08-12 13:45:14 | vstinner | set | messageid: <1597239914.14.0.606195150707.issue40949@roundup.psfhosted.org> |
2020-08-12 13:45:14 | vstinner | link | issue40949 messages |
2020-08-12 13:45:14 | vstinner | create | |
|