From: Federico Caselli Date: Sat, 27 Aug 2022 12:48:02 +0000 (+0200) Subject: restore test concurrency X-Git-Tag: rel_2_0_0b1~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa30381444803af15eb128eabd7dd49609716f01;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git restore test concurrency Change-Id: I118ce933d1fd1203e97ef2959ee6def595f1fc0b --- diff --git a/test/ext/asyncio/test_engine_py3k.py b/test/ext/asyncio/test_engine_py3k.py index 8e6fdee7d9..c624c2108f 100644 --- a/test/ext/asyncio/test_engine_py3k.py +++ b/test/ext/asyncio/test_engine_py3k.py @@ -1,3 +1,4 @@ +import asyncio import inspect as stdlib_inspect from sqlalchemy import Column @@ -506,8 +507,8 @@ class AsyncEngineTest(EngineFixture): @async_test async def test_init_once_concurrency(self, async_engine): async with async_engine.connect() as c1, async_engine.connect() as c2: - eq_(await c1.scalar(select(1)), 1) - eq_(await c2.scalar(select(1)), 1) + coro = asyncio.wait([c1.scalar(select(1)), c2.scalar(select(2))]) + eq_(await coro, [1, 2]) @async_test async def test_connect_ctxmanager(self, async_engine):