test__api_timeout is too sensitive to timing and ordering. Where did I hear that before?

This commit is contained in:
Ryan Williams
2010-01-10 12:16:33 -08:00
parent 0ba1544ba6
commit ad79a49224

View File

@@ -65,9 +65,9 @@ class Test(unittest.TestCase):
XDELAY=0.1
start = time.time()
with timeout(XDELAY, None):
sleep(XDELAY*2)
sleep(XDELAY*10)
delta = (time.time()-start)
assert delta<XDELAY*2, delta
assert delta<XDELAY*10, delta
# passing None as seconds disables the timer
with timeout(None):