@@ -91,28 +91,28 @@ async def test_aio_generator_timeout_detector() -> None:
9191
9292 async def generator () -> types .AsyncGenerator [int , None ]:
9393 for i in range (10 ):
94- await asyncio .sleep (i / 100 .0 )
94+ await asyncio .sleep (i / 20 .0 )
9595 yield i
9696
9797 detector = python_utils .aio_generator_timeout_detector
9898 # Test regular timeout with reraise
9999 with pytest .raises (asyncio .TimeoutError ):
100- async for i in detector (generator (), 0.05 ):
100+ async for i in detector (generator (), 0.25 ):
101101 pass
102102
103103 # Test regular timeout with clean exit
104- async for i in detector (generator (), 0.05 , on_timeout = None ):
104+ async for i in detector (generator (), 0.25 , on_timeout = None ):
105105 pass
106106
107107 assert i == 4
108108
109109 # Test total timeout with reraise
110110 with pytest .raises (asyncio .TimeoutError ):
111- async for i in detector (generator (), total_timeout = 0.1 ):
111+ async for i in detector (generator (), total_timeout = 0.5 ):
112112 pass
113113
114114 # Test total timeout with clean exit
115- async for i in detector (generator (), total_timeout = 0.1 , on_timeout = None ):
115+ async for i in detector (generator (), total_timeout = 0.5 , on_timeout = None ):
116116 pass
117117
118118 assert i == 4
0 commit comments