(n)
| 174 | @pytest.mark.crdb_skip("backend pid") |
| 175 | async def test_queue(pool_cls, dsn): |
| 176 | async def worker(n): |
| 177 | t0 = time() |
| 178 | async with p.connection() as conn: |
| 179 | assert conn._pool is p |
| 180 | await conn.execute("select pg_sleep(0.2)") |
| 181 | pid = conn.info.backend_pid |
| 182 | t1 = time() |
| 183 | results.append((n, t1 - t0, pid)) |
| 184 | |
| 185 | results: list[tuple[int, float, int]] = [] |
| 186 | async with pool_cls(dsn, min_size=min_size(pool_cls, 2), max_size=2) as p: |