Message198298
| Author |
barry |
| Recipients |
Arfrever, akuchling, barry, benjamin.peterson, christian.heimes, georg.brandl, giampaolo.rodola, inc0, larry, neologix, pitrou, serhiy.storchaka |
| Date |
2013年09月22日.19:50:55 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1379879455.81.0.596338200849.issue16038@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Okay, this one is quite odd. It's definitely a timing issue.
If I put a `import time; time.sleep(1)` at the beginning of test_retrlines_too_line() -- i.e. first line of the method -- then the test reliably passes. If I put a `print(len(line))` just before the maxline test in FTP.retrlines(), then the test will pass just as reliably.
If I put that retrlines() print *after* the maxline test, then it passes sometimes and fails sometimes. When if fails, it's only ready 12 bytes from the `fp.readline()` call. When it passes, it's reading 8193 bytes (thus triggering the expected exception).
I really hate to put a sleep in the test to make it pass. Obviously it would be better not to fudge this race condition, but I don't know the code well enough to know where the race is yet. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年09月22日 19:50:55 | barry | set | recipients:
+ barry, akuchling, georg.brandl, pitrou, larry, giampaolo.rodola, christian.heimes, benjamin.peterson, Arfrever, neologix, serhiy.storchaka, inc0 |
| 2013年09月22日 19:50:55 | barry | set | messageid: <1379879455.81.0.596338200849.issue16038@psf.upfronthosting.co.za> |
| 2013年09月22日 19:50:55 | barry | link | issue16038 messages |
| 2013年09月22日 19:50:55 | barry | create |
|