@@ -226,7 +226,9 @@ async def reset(conn):
226
226
await p .wait ()
227
227
assert resets == 2
228
228
229
+
229
230
@pytest .mark .gaussdb_skip ("backend pid" )
231
+ @pytest .mark .opengauss_skip ("backend pid" )
230
232
@pytest .mark .crdb_skip ("backend pid" )
231
233
async def test_reset_badstate (dsn , caplog ):
232
234
caplog .set_level (logging .WARNING , logger = "psycopg.pool" )
@@ -247,7 +249,9 @@ async def reset(conn):
247
249
assert caplog .records
248
250
assert "INTRANS" in caplog .records [0 ].message
249
251
252
+
250
253
@pytest .mark .gaussdb_skip ("backend pid" )
254
+ @pytest .mark .opengauss_skip ("backend pid" )
251
255
@pytest .mark .crdb_skip ("backend pid" )
252
256
async def test_reset_broken (dsn , caplog ):
253
257
caplog .set_level (logging .WARNING , logger = "psycopg.pool" )
@@ -269,7 +273,9 @@ async def reset(conn):
269
273
assert caplog .records
270
274
assert "WAT" in caplog .records [0 ].message
271
275
276
+
272
277
@pytest .mark .gaussdb_skip ("backend pid" )
278
+ @pytest .mark .opengauss_skip ("backend pid" )
273
279
@pytest .mark .crdb_skip ("backend pid" )
274
280
async def test_intrans_rollback (dsn , caplog ):
275
281
caplog .set_level (logging .WARNING , logger = "psycopg.pool" )
@@ -312,7 +318,9 @@ async def test_inerror_rollback(dsn, caplog):
312
318
assert len (caplog .records ) == 1
313
319
assert "INERROR" in caplog .records [0 ].message
314
320
321
+
315
322
@pytest .mark .gaussdb_skip ("backend pid" )
323
+ @pytest .mark .opengauss_skip ("backend pid" )
316
324
@pytest .mark .crdb_skip ("backend pid" )
317
325
@pytest .mark .crdb_skip ("copy" )
318
326
async def test_active_close (dsn , caplog ):
@@ -333,7 +341,9 @@ async def test_active_close(dsn, caplog):
333
341
assert "ACTIVE" in caplog .records [0 ].message
334
342
assert "BAD" in caplog .records [1 ].message
335
343
344
+
336
345
@pytest .mark .gaussdb_skip ("backend pid" )
346
+ @pytest .mark .opengauss_skip ("backend pid" )
337
347
@pytest .mark .crdb_skip ("backend pid" )
338
348
async def test_fail_rollback_close (dsn , caplog , monkeypatch ):
339
349
caplog .set_level (logging .WARNING , logger = "psycopg.pool" )
@@ -445,7 +455,7 @@ async def worker(n):
445
455
446
456
times = [item [1 ] for item in results ]
447
457
for got , want in zip (times , want_times ):
448
- assert got == pytest .approx (want , 0.1 ), times
458
+ assert got == pytest .approx (want , 0.2 ), times
449
459
450
460
451
461
@pytest .mark .slow
@@ -694,6 +704,7 @@ async def test_bad_resize(dsn, min_size, max_size):
694
704
@pytest .mark .slow
695
705
@pytest .mark .timing
696
706
@pytest .mark .gaussdb_skip ("backend pid" )
707
+ @pytest .mark .opengauss_skip ("backend pid" )
697
708
@pytest .mark .crdb_skip ("backend pid" )
698
709
async def test_max_lifetime (dsn ):
699
710
async with pool .AsyncConnectionPool (dsn , min_size = 1 , max_lifetime = 0.2 ) as p :
@@ -706,7 +717,9 @@ async def test_max_lifetime(dsn):
706
717
707
718
assert pids [0 ] == pids [1 ] != pids [4 ], pids
708
719
720
+
709
721
@pytest .mark .gaussdb_skip ("backend pid" )
722
+ @pytest .mark .opengauss_skip ("backend pid" )
710
723
@pytest .mark .crdb_skip ("backend pid" )
711
724
async def test_check (dsn , caplog ):
712
725
caplog .set_level (logging .WARNING , logger = "psycopg.pool" )
@@ -736,7 +749,9 @@ async def test_check_idle(dsn):
736
749
async with p .connection () as conn :
737
750
assert conn .info .transaction_status == TransactionStatus .IDLE
738
751
752
+
739
753
@pytest .mark .gaussdb_skip ("pg_terminate_backend" )
754
+ @pytest .mark .opengauss_skip ("pg_terminate_backend" )
740
755
@pytest .mark .crdb_skip ("pg_terminate_backend" )
741
756
async def test_connect_no_check (dsn ):
742
757
async with pool .AsyncConnectionPool (dsn , min_size = 2 ) as p :
@@ -752,7 +767,9 @@ async def test_connect_no_check(dsn):
752
767
async with p .connection () as conn2 :
753
768
await conn2 .execute ("select 2" )
754
769
770
+
755
771
@pytest .mark .gaussdb_skip ("pg_terminate_backend" )
772
+ @pytest .mark .opengauss_skip ("pg_terminate_backend" )
756
773
@pytest .mark .crdb_skip ("pg_terminate_backend" )
757
774
@pytest .mark .parametrize ("autocommit" , [True , False ])
758
775
async def test_connect_check (dsn , caplog , autocommit ):
@@ -788,6 +805,7 @@ async def test_connect_check(dsn, caplog, autocommit):
788
805
@pytest .mark .parametrize ("autocommit" , [True , False ])
789
806
@pytest .mark .crdb_skip ("pg_terminate_backend" )
790
807
@pytest .mark .gaussdb_skip ("pg_terminate_backend" )
808
+ @pytest .mark .opengauss_skip ("pg_terminate_backend" )
791
809
async def test_getconn_check (dsn , caplog , autocommit ):
792
810
caplog .set_level (logging .WARNING , logger = "psycopg.pool" )
793
811
@@ -850,6 +868,7 @@ async def test_connect_check_timeout(dsn, proxy):
850
868
851
869
@pytest .mark .slow
852
870
@pytest .mark .gaussdb_skip ("backend pid" )
871
+ @pytest .mark .opengauss_skip ("backend pid" )
853
872
async def test_check_max_lifetime (dsn ):
854
873
async with pool .AsyncConnectionPool (dsn , min_size = 1 , max_lifetime = 0.2 ) as p :
855
874
async with p .connection () as conn :
@@ -882,7 +901,9 @@ async def test_stats_connect(proxy, monkeypatch):
882
901
assert stats ["connections_errors" ] > 0
883
902
assert stats ["connections_lost" ] == 3
884
903
904
+
885
905
@pytest .mark .gaussdb_skip ("pg_terminate_backend" )
906
+ @pytest .mark .opengauss_skip ("pg_terminate_backend" )
886
907
@pytest .mark .crdb_skip ("pg_terminate_backend" )
887
908
async def test_stats_check (dsn ):
888
909
async with pool .AsyncConnectionPool (
0 commit comments