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

Function TestConnQuery

pgxpool/conn_test.go:30–45  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

28}
29
30func TestConnQuery(t *testing.T) {
31 t.Parallel()
32
33 ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
34 defer cancel()
35
36 pool, err := pgxpool.New(ctx, os.Getenv("PGX_TEST_DATABASE"))
37 require.NoError(t, err)
38 defer pool.Close()
39
40 c, err := pool.Acquire(ctx)
41 require.NoError(t, err)
42 defer c.Release()
43
44 testQuery(t, ctx, c)
45}
46
47func TestConnQueryRow(t *testing.T) {
48 t.Parallel()

Callers

nothing calls this directly

Calls 5

NewFunction · 0.92
testQueryFunction · 0.85
AcquireMethod · 0.80
ReleaseMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected