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):
614
614
615
615
616
616
@unittest .skipIf (os .environ .get ('PGHOST' ), 'using remote cluster for testing' )
617
- class TestHostStandby (tb .ConnectedTestCase ):
617
+ class TestHotStandby (tb .ConnectedTestCase ):
618
618
@classmethod
619
619
def setUpClass (cls ):
620
620
super ().setUpClass ()
@@ -681,3 +681,14 @@ async def worker():
681
681
tasks = [worker () for _ in range (n )]
682
682
await asyncio .gather (* tasks , loop = self .loop )
683
683
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