MCPcopy
hub / github.com/psycopg/psycopg / test_open_wait

Function test_open_wait

tests/pool/test_pool.py:394–407  ·  view source on GitHub ↗
(dsn, monkeypatch)

Source from the content-addressed store, hash-verified

392@pytest.mark.slow
393@pytest.mark.timing
394def test_open_wait(dsn, monkeypatch):
395 delay_connection(monkeypatch, 0.1)
396 with pytest.raises(pool.PoolTimeout):
397 p = pool.ConnectionPool(dsn, min_size=4, num_workers=1, open=False)
398 try:
399 p.open(wait=True, timeout=0.3)
400 finally:
401 p.close()
402
403 p = pool.ConnectionPool(dsn, min_size=4, num_workers=1, open=False)
404 try:
405 p.open(wait=True, timeout=0.5)
406 finally:
407 p.close()
408
409
410@pytest.mark.slow

Callers

nothing calls this directly

Calls 3

openMethod · 0.95
closeMethod · 0.95
delay_connectionFunction · 0.70

Tested by

no test coverage detected