Skip to content

Commit 14ab4f2

Browse files
committed
Fix test_prepare_19_concurrent_calls test
1 parent 7ffafa9 commit 14ab4f2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_prepare.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,15 +353,16 @@ async def test_prepare_18_empty_result(self):
353353
self.assertIsNone(await self.con.fetchrow(''))
354354

355355
async def test_prepare_19_concurrent_calls(self):
356-
st = self.loop.create_task(self.con.prepare('SELECT 1'))
356+
st = self.loop.create_task(self.con.prepare(
357+
'SELECT ROW(pg_sleep(0.02), 1)'))
357358
await asyncio.sleep(0, loop=self.loop)
358359

359360
with self.assertRaisesRegex(asyncpg.InterfaceError,
360361
'another operation'):
361362
await self.con.execute('SELECT 2')
362363

363364
st = await st
364-
self.assertEqual(await st.fetchval(), 1)
365+
self.assertEqual(await st.fetchval(), (None, 1))
365366

366367
async def test_prepare_20_concurrent_calls(self):
367368
for methname, val in [('fetch', [(1,)]),

0 commit comments

Comments
 (0)