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

Function TestTxCopyFrom

pgxpool/tx_test.go:81–96  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

79}
80
81func TestTxCopyFrom(t *testing.T) {
82 t.Parallel()
83
84 ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
85 defer cancel()
86
87 pool, err := pgxpool.New(ctx, os.Getenv("PGX_TEST_DATABASE"))
88 require.NoError(t, err)
89 defer pool.Close()
90
91 tx, err := pool.Begin(ctx)
92 require.NoError(t, err)
93 defer tx.Rollback(ctx)
94
95 testCopyFrom(t, ctx, tx)
96}

Callers

nothing calls this directly

Calls 5

NewFunction · 0.92
testCopyFromFunction · 0.85
CloseMethod · 0.65
BeginMethod · 0.65
RollbackMethod · 0.65

Tested by

no test coverage detected