@@ -43,7 +43,6 @@ async def _cancel(self, waiter):
4343
4444class TestPool (tb .ConnectedTestCase ):
4545
46- @unittest .skip ("UNLISTEN statement is not yet supported." )
4746 async def test_pool_01 (self ):
4847 for n in {1 , 5 , 10 , 20 , 100 }:
4948 with self .subTest (tasksnum = n ):
@@ -59,7 +58,6 @@ async def worker():
5958 await asyncio .gather (* tasks )
6059 await pool .close ()
6160
62- @unittest .skip ("UNLISTEN statement is not yet supported." )
6361 async def test_pool_02 (self ):
6462 for n in {1 , 3 , 5 , 10 , 20 , 100 }:
6563 with self .subTest (tasksnum = n ):
@@ -108,7 +106,6 @@ async def test_pool_04(self):
108106
109107 pool .terminate ()
110108
111- @unittest .skip ("UNLISTEN statement is not yet supported." )
112109 async def test_pool_05 (self ):
113110 for n in {1 , 3 , 5 , 10 , 20 , 100 }:
114111 with self .subTest (tasksnum = n ):
@@ -123,7 +120,6 @@ async def worker():
123120 await asyncio .gather (* tasks )
124121 await pool .close ()
125122
126- @unittest .skip ("UNLISTEN statement is not yet supported." )
127123 async def test_pool_06 (self ):
128124 fut = asyncio .Future ()
129125
@@ -206,7 +202,6 @@ async def test_pool_08(self):
206202 with self .assertRaisesRegex (async_gaussdb .InterfaceError , 'is not a member' ):
207203 await pool .release (con ._con )
208204
209- @unittest .skip ("UNLISTEN statement is not yet supported." )
210205 async def test_pool_09 (self ):
211206 pool1 = await self .create_pool (database = 'postgres' ,
212207 min_size = 1 , max_size = 1 )
@@ -225,7 +220,6 @@ async def test_pool_09(self):
225220 await pool1 .close ()
226221 await pool2 .close ()
227222
228- @unittest .skip ("UNLISTEN statement is not yet supported." )
229223 async def test_pool_10 (self ):
230224 pool = await self .create_pool (database = 'postgres' ,
231225 min_size = 1 , max_size = 1 )
@@ -236,7 +230,6 @@ async def test_pool_10(self):
236230
237231 await pool .close ()
238232
239- @unittest .skip ("UNLISTEN statement is not yet supported." )
240233 async def test_pool_11 (self ):
241234 pool = await self .create_pool (database = 'postgres' ,
242235 min_size = 1 , max_size = 1 )
@@ -294,7 +287,6 @@ async def test_pool_11(self):
294287
295288 await pool .close ()
296289
297- @unittest .skip ("UNLISTEN statement is not yet supported." )
298290 async def test_pool_12 (self ):
299291 pool = await self .create_pool (database = 'postgres' ,
300292 min_size = 1 , max_size = 1 )
@@ -305,7 +297,6 @@ async def test_pool_12(self):
305297
306298 await pool .close ()
307299
308- @unittest .skip ("UNLISTEN statement is not yet supported." )
309300 async def test_pool_13 (self ):
310301 pool = await self .create_pool (database = 'postgres' ,
311302 min_size = 1 , max_size = 1 )
@@ -325,7 +316,6 @@ def test_pool_init_run_until_complete(self):
325316 pool = self .loop .run_until_complete (pool_init )
326317 self .assertIsInstance (pool , async_gaussdb .pool .Pool )
327318
328- @unittest .skip ("UNLISTEN statement is not yet supported." )
329319 async def test_pool_exception_in_setup_and_init (self ):
330320 class Error (Exception ):
331321 pass
@@ -419,7 +409,6 @@ async def worker():
419409 self .cluster .trust_local_connections ()
420410 self .cluster .reload ()
421411
422- @unittest .skip ("UNLISTEN statement is not yet supported." )
423412 async def test_pool_handles_task_cancel_in_acquire_with_timeout (self ):
424413 # See https://github.com/MagicStack/async_gaussdb/issues/547
425414 pool = await self .create_pool (database = 'postgres' ,
@@ -440,7 +429,6 @@ async def worker():
440429 # Check that the connection has been returned to the pool.
441430 self .assertEqual (pool ._queue .qsize (), 1 )
442431
443- @unittest .skip ("UNLISTEN statement is not yet supported." )
444432 async def test_pool_handles_task_cancel_in_release (self ):
445433 # Use SlowResetConnectionPool to simulate
446434 # the Task.cancel() and __aexit__ race.
@@ -462,7 +450,6 @@ async def worker():
462450 # Check that the connection has been returned to the pool.
463451 self .assertEqual (pool ._queue .qsize (), 1 )
464452
465- @unittest .skip ("UNLISTEN statement is not yet supported." )
466453 async def test_pool_handles_query_cancel_in_release (self ):
467454 # Use SlowResetConnectionPool to simulate
468455 # the Task.cancel() and __aexit__ race.
@@ -528,7 +515,6 @@ async def test(pool):
528515
529516 self .assertEqual (len (cons ), N )
530517
531- @unittest .skip ("UNLISTEN statement is not yet supported." )
532518 async def test_pool_release_in_xact (self ):
533519 """Test that Connection.reset() closes any open transaction."""
534520 async with self .create_pool (database = 'postgres' ,
@@ -558,7 +544,6 @@ async def get_xact_id(con):
558544 id3 = await get_xact_id (con )
559545 self .assertNotEqual (id2 , id3 )
560546
561- @unittest .skip ("UNLISTEN statement is not yet supported." )
562547 async def test_pool_connection_methods (self ):
563548 async def test_fetch (pool ):
564549 i = random .randint (0 , 20 )
@@ -610,7 +595,6 @@ async def run(N, meth):
610595 with self .subTest (method = method .__name__ ):
611596 await run (200 , method )
612597
613- @unittest .skip ("UNLISTEN statement is not yet supported." )
614598 async def test_pool_connection_execute_many (self ):
615599 async def worker (pool ):
616600 await asyncio .sleep (random .random () / 100 )
@@ -639,7 +623,6 @@ async def worker(pool):
639623 finally :
640624 await pool .execute ('DROP TABLE exmany' )
641625
642- @unittest .skip ("UNLISTEN statement is not yet supported." )
643626 async def test_pool_max_inactive_time_01 (self ):
644627 async with self .create_pool (
645628 database = 'postgres' , min_size = 1 , max_size = 1 ,
@@ -659,7 +642,6 @@ async def test_pool_max_inactive_time_01(self):
659642 'SELECT 1' )
660643 self .assertIs (pool ._holders [0 ]._con , con )
661644
662- @unittest .skip ("UNLISTEN statement is not yet supported." )
663645 async def test_pool_max_inactive_time_02 (self ):
664646 async with self .create_pool (
665647 database = 'postgres' , min_size = 1 , max_size = 1 ,
@@ -683,7 +665,6 @@ async def test_pool_max_inactive_time_02(self):
683665 'SELECT 1' )
684666 self .assertIsNot (pool ._holders [0 ]._con , con )
685667
686- @unittest .skip ("UNLISTEN statement is not yet supported." )
687668 async def test_pool_max_inactive_time_03 (self ):
688669 async with self .create_pool (
689670 database = 'postgres' , min_size = 1 , max_size = 1 ,
@@ -704,7 +685,6 @@ async def test_pool_max_inactive_time_03(self):
704685 'SELECT 1' )
705686 self .assertIs (pool ._holders [0 ]._con , con )
706687
707- @unittest .skip ("UNLISTEN statement is not yet supported." )
708688 async def test_pool_max_inactive_time_04 (self ):
709689 # Chaos test for max_inactive_connection_lifetime.
710690 DURATION = 2.0
@@ -736,14 +716,14 @@ async def worker(pool):
736716
737717 self .assertGreaterEqual (N , 50 )
738718
739- @unittest .skip ("UNLISTEN statement is not yet supported." )
740719 async def test_pool_max_inactive_time_05 (self ):
741720 # Test that idle never-acquired connections abide by
742721 # the max inactive lifetime.
743722 async with self .create_pool (
744723 database = 'postgres' , min_size = 2 , max_size = 2 ,
745- max_inactive_connection_lifetime = 0.2 ) as pool :
724+ max_inactive_connection_lifetime = 0.3 ) as pool :
746725
726+ await asyncio .sleep (0.02 )
747727 self .assertIsNotNone (pool ._holders [0 ]._con )
748728 self .assertIsNotNone (pool ._holders [1 ]._con )
749729
@@ -755,7 +735,6 @@ async def test_pool_max_inactive_time_05(self):
755735 # but should be closed nonetheless.
756736 self .assertIs (pool ._holders [1 ]._con , None )
757737
758- @unittest .skip ("UNLISTEN statement is not yet supported." )
759738 async def test_pool_handles_inactive_connection_errors (self ):
760739 pool = await self .create_pool (database = 'postgres' ,
761740 min_size = 1 , max_size = 1 )
@@ -776,7 +755,6 @@ async def test_pool_handles_inactive_connection_errors(self):
776755
777756 await pool .close ()
778757
779- @unittest .skip ("UNLISTEN statement is not yet supported." )
780758 async def test_pool_size_and_capacity (self ):
781759 async with self .create_pool (
782760 database = 'postgres' ,
@@ -809,7 +787,6 @@ async def test_pool_closing(self):
809787 pool .terminate ()
810788 self .assertTrue (pool .is_closing ())
811789
812- @unittest .skip ("UNLISTEN statement is not yet supported." )
813790 async def test_pool_handles_transaction_exit_in_asyncgen_1 (self ):
814791 pool = await self .create_pool (database = 'postgres' ,
815792 min_size = 1 , max_size = 1 )
@@ -831,7 +808,6 @@ class MyException(Exception):
831808 async for _ in iterate (con ): # noqa
832809 raise MyException ()
833810
834- @unittest .skip ("UNLISTEN statement is not yet supported." )
835811 async def test_pool_handles_transaction_exit_in_asyncgen_2 (self ):
836812 pool = await self .create_pool (database = 'postgres' ,
837813 min_size = 1 , max_size = 1 )
@@ -856,7 +832,6 @@ class MyException(Exception):
856832
857833 del iterator
858834
859- @unittest .skip ("UNLISTEN statement is not yet supported." )
860835 async def test_pool_handles_asyncgen_finalization (self ):
861836 pool = await self .create_pool (database = 'postgres' ,
862837 min_size = 1 , max_size = 1 )
@@ -878,7 +853,6 @@ class MyException(Exception):
878853 async for _ in iterate (con ): # noqa
879854 raise MyException ()
880855
881- @unittest .skip ("UNLISTEN statement is not yet supported." )
882856 async def test_pool_close_waits_for_release (self ):
883857 pool = await self .create_pool (database = 'postgres' ,
884858 min_size = 1 , max_size = 1 )
@@ -934,7 +908,6 @@ async def test_pool_expire_connections(self):
934908 self .assertIsNone (pool ._holders [0 ]._con )
935909 await pool .close ()
936910
937- @unittest .skip ("UNLISTEN statement is not yet supported." )
938911 async def test_pool_set_connection_args (self ):
939912 pool = await self .create_pool (database = 'postgres' ,
940913 min_size = 1 , max_size = 1 )
@@ -1007,7 +980,6 @@ async def test_pool_init_and_use_race(self):
1007980 await pool_task
1008981 await pool .close ()
1009982
1010- @unittest .skip ("UNLISTEN statement is not yet supported." )
1011983 async def test_pool_remote_close (self ):
1012984 pool = await self .create_pool (min_size = 1 , max_size = 1 )
1013985 backend_pid_fut = self .loop .create_future ()
0 commit comments