MCPcopy
hub / github.com/psycopg/psycopg / test_reset_async

Function test_reset_async

tests/pq/test_pgconn.py:166–178  ·  view source on GitHub ↗
(pgconn)

Source from the content-addressed store, hash-verified

164
165@pytest.mark.crdb_skip("pg_terminate_backend")
166def test_reset_async(pgconn):
167 assert pgconn.status == pq.ConnStatus.OK
168 pgconn.exec_(b"select pg_terminate_backend(pg_backend_pid())")
169 assert pgconn.status == pq.ConnStatus.BAD
170 pgconn.reset_start()
171 wait(pgconn, "reset_poll")
172
173 pgconn.finish()
174 with pytest.raises(psycopg.OperationalError):
175 pgconn.reset_start()
176
177 with pytest.raises(psycopg.OperationalError):
178 pgconn.reset_poll()
179
180
181def test_ping(dsn):

Callers

nothing calls this directly

Calls 5

waitFunction · 0.85
exec_Method · 0.45
reset_startMethod · 0.45
finishMethod · 0.45
reset_pollMethod · 0.45

Tested by

no test coverage detected