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

Function TestQueryCloseBefore

query_test.go:1561–1570  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1559}
1560
1561func TestQueryCloseBefore(t *testing.T) {
1562 t.Parallel()
1563
1564 conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
1565 closeConn(t, conn)
1566
1567 _, err := conn.Query(context.Background(), "select 1")
1568 require.Error(t, err)
1569 assert.True(t, pgconn.SafeToRetry(err))
1570}
1571
1572func TestScanRow(t *testing.T) {
1573 t.Parallel()

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected