From: Federico Caselli Date: Mon, 29 Aug 2022 18:57:01 +0000 (+0200) Subject: restore test concurrency try 2 X-Git-Tag: rel_1_4_41~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af09ab014e0be51c702e407ceb9b122474140bc8;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git restore test concurrency try 2 Change-Id: I54730f9683a1de3f1379ca8d2a1cab8c485e7bcc (cherry picked from commit d8e135a474bdc2147786ec8919facc8f6fdf84f6) --- diff --git a/test/ext/asyncio/test_engine_py3k.py b/test/ext/asyncio/test_engine_py3k.py index 673eff2fb1..7875b9aec4 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 @@ -487,8 +488,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.gather(c1.scalar(select(1)), c2.scalar(select(2))) + eq_(await coro, [1, 2]) @async_test async def test_connect_ctxmanager(self, async_engine):