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

Function TestConnExec

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

Source from the content-addressed store, hash-verified

11)
12
13func TestConnExec(t *testing.T) {
14 t.Parallel()
15
16 ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
17 defer cancel()
18
19 pool, err := pgxpool.New(ctx, os.Getenv("PGX_TEST_DATABASE"))
20 require.NoError(t, err)
21 defer pool.Close()
22
23 c, err := pool.Acquire(ctx)
24 require.NoError(t, err)
25 defer c.Release()
26
27 testExec(t, ctx, c)
28}
29
30func TestConnQuery(t *testing.T) {
31 t.Parallel()

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected