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

Function requireInserted

rivertest/rivertest.go:110–117  ·  view source on GitHub ↗
(ctx context.Context, t testingT, driver TDriver, expectedJob TArgs, opts *RequireInsertedOpts)

Source from the content-addressed store, hash-verified

108}
109
110func requireInserted[TDriver riverdriver.Driver[TTx], TTx any, TArgs river.JobArgs](ctx context.Context, t testingT, driver TDriver, expectedJob TArgs, opts *RequireInsertedOpts) *river.Job[TArgs] {
111 t.Helper()
112 actualArgs, err := requireInsertedErr[TDriver](ctx, t, driver.GetExecutor(), expectedJob, opts)
113 if err != nil {
114 failuref(t, "Internal failure: %s", err)
115 }
116 return actualArgs
117}
118
119// RequireInsertedTx is a test helper that verifies that a job of the given kind
120// was inserted for work, failing the test if it wasn't. If found, the inserted

Callers 2

TestRequireInsertedFunction · 0.85
RequireInsertedFunction · 0.85

Calls 3

failurefFunction · 0.85
HelperMethod · 0.65
GetExecutorMethod · 0.65

Tested by 1

TestRequireInsertedFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…