MCPcopy
hub / github.com/jackc/pgx / TestExecFailureCloseBefore

Function TestExecFailureCloseBefore

conn_test.go:380–389  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

378}
379
380func TestExecFailureCloseBefore(t *testing.T) {
381 t.Parallel()
382
383 conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
384 closeConn(t, conn)
385
386 _, err := conn.Exec(context.Background(), "select 1")
387 require.Error(t, err)
388 assert.True(t, pgconn.SafeToRetry(err))
389}
390
391func TestExecPerQuerySimpleProtocol(t *testing.T) {
392 t.Parallel()

Callers

nothing calls this directly

Calls 5

SafeToRetryFunction · 0.92
mustConnectStringFunction · 0.85
closeConnFunction · 0.70
ExecMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…