File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -614,7 +614,7 @@ async def worker(pool):
614614
615615
616616@unittest .skipIf (os .environ .get ('PGHOST' ), 'using remote cluster for testing' )
617- class TestHostStandby (tb .ConnectedTestCase ):
617+ class TestHotStandby (tb .ConnectedTestCase ):
618618 @classmethod
619619 def setUpClass (cls ):
620620 super ().setUpClass ()
@@ -681,3 +681,14 @@ async def worker():
681681 tasks = [worker () for _ in range (n )]
682682 await asyncio .gather (* tasks , loop = self .loop )
683683 await pool .close ()
684+
685+ async def test_standby_cursors (self ):
686+ con = await self .standby_cluster .connect (
687+ database = 'postgres' , loop = self .loop )
688+
689+ try :
690+ async with con .transaction ():
691+ cursor = await con .cursor ('SELECT 1' )
692+ self .assertEqual (await cursor .fetchrow (), (1 ,))
693+ finally :
694+ await con .close ()
You can’t perform that action at this time.
0 commit comments