Skip to content

Commit ca8e88e

Browse files
committed
tests: test ordering of concurrent query in async mode
1 parent 0f969ab commit ca8e88e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/unit_tests/connections/batch_async/test_async_ws.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ async def asyncSetUp(self):
2626

2727
async def test_batch(self):
2828
async with asyncio.TaskGroup() as tg:
29-
tasks = [tg.create_task(self.connection.query("select $p**2 as ret from {}", dict(p=num))) for num in range(5)]
29+
tasks = [tg.create_task(self.connection.query("RETURN sleep(duration::from::millis($d)) or $p**2", dict(d=10 if num%2 else 0, p=num))) for num in range(5)]
3030

31-
outcome = [t.result()[0]["ret"] for t in tasks]
31+
outcome = [t.result() for t in tasks]
3232
self.assertEqual([0, 1, 4, 9, 16], outcome)
3333
await self.connection.socket.close()
3434

0 commit comments

Comments
 (0)