Skip to content

Commit

Permalink
Raise asyncio test timeouts in-case CI/CD is just really slow
Browse files Browse the repository at this point in the history
  • Loading branch information
aiudirog committed May 22, 2023
1 parent 02b44c6 commit 88e33a1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions aiuti/tests/test_buffer_async_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def error() -> int:
return 1 # noqa

func.await_(error())
await aio.wait_for(func.wait(), 10)
await aio.wait_for(func.wait(), 60)
assert not buffered # sanity


Expand All @@ -56,7 +56,7 @@ async def error(i: int) -> int:

for x in range(250):
func.await_(error(x))
await aio.wait_for(func.wait(), 10)
await aio.wait_for(func.wait(), 60)
assert buffered == set(range(250)) - set(range(0, 250, 10))


Expand All @@ -67,7 +67,7 @@ async def test_empty_iter(func: BufferAsyncCalls[int],
a deadlock.
"""
func.map(iter([]))
await aio.wait_for(func.wait(), 10)
await aio.wait_for(func.wait(), 60)
assert not buffered # sanity


Expand All @@ -83,7 +83,7 @@ def error_gen() -> Yields[int]:
yield 1 # noqa

func.map(error_gen())
await aio.wait_for(func.wait(), 10)
await aio.wait_for(func.wait(), 60)
assert not buffered # sanity


Expand All @@ -96,7 +96,7 @@ def error_gen() -> Yields[int]:
raise ValueError

func.map(error_gen())
await aio.wait_for(func.wait(), 10)
await aio.wait_for(func.wait(), 60)
assert buffered == {1}


Expand All @@ -115,7 +115,7 @@ def error_gen(i: int) -> Yields[int]:

for start in range(0, 250, 10):
func.map(error_gen(start))
await aio.wait_for(func.wait(), 10)
await aio.wait_for(func.wait(), 60)
assert buffered == set(range(250))


Expand All @@ -131,7 +131,7 @@ async def empty_gen() -> AYields[int]:
yield 1 # noqa

func.amap(empty_gen())
await aio.wait_for(func.wait(), 10)
await aio.wait_for(func.wait(), 60)
assert not buffered # sanity


Expand All @@ -147,7 +147,7 @@ async def error_gen() -> AYields[int]:
yield 1 # noqa

func.amap(error_gen())
await aio.wait_for(func.wait(), 10)
await aio.wait_for(func.wait(), 60)
assert not buffered # sanity


Expand All @@ -161,7 +161,7 @@ async def error_gen() -> AYields[int]:
raise ValueError

func.amap(error_gen())
await aio.wait_for(func.wait(), 10)
await aio.wait_for(func.wait(), 60)
assert buffered == {1}


Expand All @@ -181,7 +181,7 @@ async def error_gen(i: int) -> AYields[int]:

for start in range(0, 250, 10):
func.amap(error_gen(start))
await aio.wait_for(func.wait(), 10)
await aio.wait_for(func.wait(), 60)
assert buffered == set(range(250))


Expand Down

0 comments on commit 88e33a1

Please sign in to comment.