Skip to content

Commit c6179cc

Browse files
committed
Fix test_prepare_19_concurrent_calls
1 parent 6b412be commit c6179cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_prepare.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,10 @@ async def test_prepare_18_empty_result(self):
355355
async def test_prepare_19_concurrent_calls(self):
356356
st = self.loop.create_task(self.con.fetchval(
357357
'SELECT ROW(pg_sleep(0.02), 1)'))
358-
await asyncio.sleep(0, loop=self.loop)
358+
359+
# Wait for some time to make sure the first query is fully
360+
# prepared (!) and is now awaiting the results (!!).
361+
await asyncio.sleep(0.01, loop=self.loop)
359362

360363
with self.assertRaisesRegex(asyncpg.InterfaceError,
361364
'another operation'):

0 commit comments

Comments
 (0)