MCPcopy
hub / github.com/psycopg/psycopg / test_setup_no_timeout

Function test_setup_no_timeout

tests/pool/test_pool_common_async.py:123–138  ·  view source on GitHub ↗
(pool_cls, dsn, proxy)

Source from the content-addressed store, hash-verified

121
122@pytest.mark.slow
123async def test_setup_no_timeout(pool_cls, dsn, proxy):
124 with pytest.raises(pool.PoolTimeout):
125 async with pool_cls(
126 proxy.client_dsn, min_size=min_size(pool_cls), num_workers=1
127 ) as p:
128 await p.wait(0.2)
129
130 async with pool_cls(
131 proxy.client_dsn, min_size=min_size(pool_cls), num_workers=1
132 ) as p:
133 await asleep(0.5)
134 assert not p._pool
135 proxy.start()
136
137 async with p.connection() as conn:
138 await conn.execute("select 1")
139
140
141@pytest.mark.slow

Callers

nothing calls this directly

Calls 7

pool_clsFunction · 0.70
min_sizeFunction · 0.70
asleepFunction · 0.50
waitMethod · 0.45
startMethod · 0.45
connectionMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected