summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_queue.py
Commit message (Collapse)AuthorAgeFilesLines
* Stab at SF 1010777: test_queue fails occasionallyTim Peters2004-08-201-14/+53
| | | | | | | | | | | | | | | | | | | | | | | | test_queue has failed occasionally for years, and there's more than one cause. The primary cause in the SF report appears to be that the test driver really needs entirely different code for thread tests that expect to raise exceptions than for thread tests that are testing non-exceptional blocking semantics. So gave them entirely different code, and added a ton of explanation. Another cause is that the blocking thread tests relied in several places on the difference between sleep(.1) and sleep(.2) being long enough for the trigger thread to do its stuff sot that the blocking thread could make progress. That's just not reliable on a loaded machine. Boosted the 0.2's to 10.0's instead, which should be long enough under any non-catastrophic system conditions. That doesn't make the test take longer to run, the 10.0 is just how long the blocking thread is *willing* to wait for the trigger thread to do something. But if the Queue module is plain broken, such tests will indeed take 10 seconds to fail now. For similar (heavy load) reasons, changed threaded-test termination to be willing to wait 10 seconds for the signal thread to end too.
* Semantic-neutral format and comment changes.Tim Peters2004-08-201-14/+16
|
* Style guide reformats. I saw this test fail on a very heavily loadedTim Peters2002-11-151-6/+9
| | | | | | Win98SE box, but whatever the cause, it had scrolled off the DOS box. (There was just the "test_queue failed" summary at the end of the regrtest run.)
* Patch #572628: Optional timeouts for put and get.Martin v. Löwis2002-10-151-2/+37
|
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-1/+1
| | | | | | | | | | | imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :)
* Fix bug 544473 - "Queue module can deadlock".Mark Hammond2002-04-191-0/+158
Use try/finally to ensure all Queue locks remain stable. Includes test case. Bugfix candidate.