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

Function TestTxSendBatch

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

Source from the content-addressed store, hash-verified

62}
63
64func TestTxSendBatch(t *testing.T) {
65 t.Parallel()
66
67 ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
68 defer cancel()
69
70 pool, err := pgxpool.New(ctx, os.Getenv("PGX_TEST_DATABASE"))
71 require.NoError(t, err)
72 defer pool.Close()
73
74 tx, err := pool.Begin(ctx)
75 require.NoError(t, err)
76 defer tx.Rollback(ctx)
77
78 testSendBatch(t, ctx, tx)
79}
80
81func TestTxCopyFrom(t *testing.T) {
82 t.Parallel()

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected