RequireInsertedTx is a test helper that verifies that a job of the given kind was inserted for work, failing the test if it wasn't. If found, the inserted job is returned so that further assertions can be made against it. job := RequireInsertedTx[*riverpgxv5.Driver](ctx, t, tx, &Job1Args{}, nil)
(ctx context.Context, tb testing.TB, tx TTx, expectedJob TArgs, opts *RequireInsertedOpts)
| 133 | // because at that point the job to return is ambiguous. Use RequireManyInserted |
| 134 | // to cover that case instead. |
| 135 | func RequireInsertedTx[TDriver riverdriver.Driver[TTx], TTx any, TArgs river.JobArgs](ctx context.Context, tb testing.TB, tx TTx, expectedJob TArgs, opts *RequireInsertedOpts) *river.Job[TArgs] { |
| 136 | tb.Helper() |
| 137 | return requireInsertedTx[TDriver](ctx, tb, tx, expectedJob, opts) |
| 138 | } |
| 139 | |
| 140 | // Internal function used by the tests so that the exported version can take |
| 141 | // `testing.TB` instead of `testing.T`. |
searching dependent graphs…