MCPcopy
hub / github.com/psycopg/psycopg / test_open_as_wait

Function test_open_as_wait

tests/pool/test_pool_async.py:412–419  ·  view source on GitHub ↗
(dsn, monkeypatch)

Source from the content-addressed store, hash-verified

410@pytest.mark.slow
411@pytest.mark.timing
412async def test_open_as_wait(dsn, monkeypatch):
413 delay_connection(monkeypatch, 0.1)
414 with pytest.raises(pool.PoolTimeout):
415 async with pool.AsyncConnectionPool(dsn, min_size=4, num_workers=1) as p:
416 await p.open(wait=True, timeout=0.3)
417
418 async with pool.AsyncConnectionPool(dsn, min_size=4, num_workers=1) as p:
419 await p.open(wait=True, timeout=0.5)
420
421
422@pytest.mark.slow

Callers

nothing calls this directly

Calls 2

delay_connectionFunction · 0.70
openMethod · 0.45

Tested by

no test coverage detected