MCPcopy Index your code
hub / github.com/riverqueue/river / TestTxPgx

Function TestTxPgx

riverdbtest/riverdbtest.go:444–448  ·  view source on GitHub ↗

TestTxPgx starts a test transaction that's rolled back automatically as the test case is cleaning itself up. This variant starts a transaction for the standard pgx/v5 driver most commonly used throughout most of River.

(ctx context.Context, tb testing.TB)

Source from the content-addressed store, hash-verified

442// This variant starts a transaction for the standard pgx/v5 driver most
443// commonly used throughout most of River.
444func TestTxPgx(ctx context.Context, tb testing.TB) pgx.Tx {
445 tb.Helper()
446 tx, _ := TestTxPgxDriver(ctx, tb, riverpgxv5.New(riversharedtest.DBPool(ctx, tb)), nil)
447 return tx
448}
449
450// TestTxPgxDriver starts a test transaction that's rolled back automatically as
451// the test case is cleaning itself up. Unlike TestTxPgx, this variant takes a

Callers 15

Test_SubscriptionManagerFunction · 0.92
TestJobCompleteTxFunction · 0.92
TestResumableSetStepTxFunction · 0.92
TestProducer_PollOnlyFunction · 0.92
TestWithTxFunction · 0.92
TestWithTxVFunction · 0.92
TestMiddlewareFunction · 0.92
TestQueueMaintainerFunction · 0.92

Calls 4

NewFunction · 0.92
DBPoolFunction · 0.92
TestTxPgxDriverFunction · 0.85
HelperMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…