]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
restore test concurrency try 2
authorFederico Caselli <cfederico87@gmail.com>
Mon, 29 Aug 2022 18:57:01 +0000 (20:57 +0200)
committerFederico Caselli <cfederico87@gmail.com>
Mon, 29 Aug 2022 18:57:01 +0000 (20:57 +0200)
Change-Id: I54730f9683a1de3f1379ca8d2a1cab8c485e7bcc

test/ext/asyncio/test_engine_py3k.py

index 8e6fdee7d9eb6c83bba4049df072260ab1fd49c5..0269aaaeecfba959c3a2f44de8051f4b45367b82 100644 (file)
@@ -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.gather(c1.scalar(select(1)), c2.scalar(select(2)))
+            eq_(await coro, [1, 2])
 
     @async_test
     async def test_connect_ctxmanager(self, async_engine):