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

Function runNewTestClient

client_test.go:219–235  ·  view source on GitHub ↗
(ctx context.Context, t *testing.T, config *Config)

Source from the content-addressed store, hash-verified

217}
218
219func runNewTestClient(ctx context.Context, t *testing.T, config *Config) *Client[pgx.Tx] {
220 t.Helper()
221
222 var (
223 dbPool = riversharedtest.DBPool(ctx, t)
224 driver = riverpgxv5.New(dbPool)
225 schema = riverdbtest.TestSchema(ctx, t, driver, nil)
226 )
227 config.Schema = schema
228
229 client, err := NewClient(driver, config)
230 require.NoError(t, err)
231
232 startClient(ctx, t, client)
233
234 return client
235}
236
237func subscribe[TTx any](t *testing.T, client *Client[TTx]) <-chan *Event {
238 t.Helper()

Calls 6

DBPoolFunction · 0.92
NewFunction · 0.92
TestSchemaFunction · 0.92
NewClientFunction · 0.85
startClientFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…