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.

classification
Title: test_multiprocessing is broken by design
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: ddvento@ucar.edu, pitrou, sbt, schwab, vstinner
Priority: normal Keywords:

Created on 2014-03-15 08:38 by schwab, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg213646 - (view) Author: Andreas Schwab (schwab) * Date: 2014-03-15 08:38
This comment say it all:

CHECK_TIMINGS = False     # making true makes tests take a lot longer
                          # and can sometimes cause some non-serious
                          # failures because some calls block a bit
                          # longer than expected

If the failures happen due to different timeouts then the test is broken by design.
msg213649 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-03-15 10:27
When relying on the timeout feature of various system APIs (e.g. waiting on a semaphore), there isn't much of an alternative to actually waiting a certain amount of time, and measuring the resulting delay. Other tests in the stdlib do this, which is indeed fragile, but better than not testing at all.

See Victor's recent issue20910, "Make sleep configurable in tests".
msg320626 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-06-27 21:29
I made different attempts, but at the end, we kept the status quo: some tests use an hardcoded timeout. When a test fails, I increase the timeout. That's not perfect, but nobody came up with a better approach, and it's not a deal.
History
Date User Action Args
2022-04-11 14:58:00adminsetgithub: 65133
2018-06-27 21:29:42vstinnersetstatus: open -> closed
resolution: wont fix
messages: + msg320626

stage: resolved
2014-05-09 17:25:31ddvento@ucar.edusetnosy: + ddvento@ucar.edu
2014-03-15 10:27:45pitrousetnosy: + vstinner, pitrou
messages: + msg213649
2014-03-15 08:41:15ned.deilysetnosy: + sbt
2014-03-15 08:38:55schwabcreate