[issue20910] Make sleep configurable in tests
STINNER Victor
report at bugs.python.org
Fri Mar 14 16:10:46 CET 2014
STINNER Victor added the comment:
> Victor Stinner wrote:
>> Is it a virtual machine or a physical machine? Was your Windows busy?
>> Did you run tests in parallel?
>
> Physical, not really other than the tests, and I ran with -j0 (on a machine with 2 single core CPUs).
Ah yes, I missed the -j0. I didn't try with -j0. Some tests should be
fixed to support shorter sleep, or default sleep should be increased.
> I'm not sure what I think of the TEST_SLEEP/TEST_SHORT_SLEEP scheme, but I do like the idea behind support.check_time_delta.
If we cannot agree on the whole patch, I will split it in two parts:
check_time_delta() and TEST_SLEEP/TEST_SHORT_SLEEP.
> 1) define a support.sleep function that multiplies the value given by some definable constant (default of 1) before passing the value to time.sleep.
Oh, I like this idea. It's closer to what is done currently.
> 2) define a support.sleep_until function, which would sleep for a given interval repeatedly until some condition is satisfied or a timeout is reached.
I'm not sure that such helper will provide useful debug info if the test fails.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20910>
_______________________________________
More information about the Python-bugs-list
mailing list