(pool_cls, dsn, caplog)
| 140 | |
| 141 | @pytest.mark.slow |
| 142 | async def test_configure_badstate(pool_cls, dsn, caplog): |
| 143 | caplog.set_level(logging.WARNING, logger="psycopg.pool") |
| 144 | |
| 145 | async def configure(conn): |
| 146 | await conn.execute("select 1") |
| 147 | |
| 148 | async with pool_cls(dsn, min_size=min_size(pool_cls), configure=configure) as p: |
| 149 | with pytest.raises(pool.PoolTimeout): |
| 150 | await p.wait(timeout=0.5) |
| 151 | |
| 152 | assert caplog.records |
| 153 | assert "INTRANS" in caplog.records[0].message |
| 154 | |
| 155 | |
| 156 | @pytest.mark.slow |