Skip to content

Commit

Permalink
[fix] simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mosquito committed Dec 11, 2018
1 parent 1e0869e commit 33eb61b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_pool.py
Expand Up @@ -33,6 +33,7 @@ async def test_simple(self):
async def getter():
async with self.pool.acquire() as instance:
assert instance > 0
await asyncio.sleep(0.01, loop=self.loop)
return self.counter

results = await asyncio.gather(
Expand All @@ -48,6 +49,7 @@ async def getter():
async def test_errored(self):
async def getter():
async with self.pool.acquire() as instance:
await asyncio.sleep(0.01, loop=self.loop)
raise RuntimeError(instance)

results = await asyncio.gather(
Expand All @@ -69,6 +71,7 @@ async def test_simple(self):

async def getter():
async with self.pool.acquire() as instance:
await asyncio.sleep(0.05, loop=self.loop)
assert instance > 0
return self.counter

Expand Down

0 comments on commit 33eb61b

Please sign in to comment.