(dsn)
| 852 | |
| 853 | @pytest.mark.slow |
| 854 | def test_check_max_lifetime(dsn): |
| 855 | with pool.ConnectionPool(dsn, min_size=1, max_lifetime=0.2) as p: |
| 856 | with p.connection() as conn: |
| 857 | pid = conn.info.backend_pid |
| 858 | with p.connection() as conn: |
| 859 | assert conn.info.backend_pid == pid |
| 860 | sleep(0.3) |
| 861 | p.check() |
| 862 | with p.connection() as conn: |
| 863 | assert conn.info.backend_pid != pid |
| 864 | |
| 865 | |
| 866 | @pytest.mark.slow |
nothing calls this directly
no test coverage detected