MCPcopy
hub / github.com/riverqueue/river / newTestConfig

Function newTestConfig

client_test.go:176–196  ·  view source on GitHub ↗
(t *testing.T, schema string)

Source from the content-addressed store, hash-verified

174}
175
176func newTestConfig(t *testing.T, schema string) *Config {
177 t.Helper()
178
179 workers := NewWorkers()
180 AddWorker(workers, &noOpWorker{})
181
182 return &Config{
183 FetchCooldown: 20 * time.Millisecond,
184 FetchPollInterval: 50 * time.Millisecond,
185 Logger: riversharedtest.Logger(t),
186 MaxAttempts: MaxAttemptsDefault,
187 Queues: map[string]QueueConfig{QueueDefault: {MaxWorkers: 50}},
188 Schema: schema,
189 Test: TestConfig{
190 Time: &riversharedtest.TimeStub{},
191 },
192 TestOnly: true, // disables staggered start in maintenance services
193 Workers: workers,
194 schedulerInterval: riverinternaltest.SchedulerShortInterval,
195 }
196}
197
198func newTestClient(t *testing.T, dbPool *pgxpool.Pool, config *Config) *Client[pgx.Tx] {
199 t.Helper()

Calls 4

LoggerFunction · 0.92
NewWorkersFunction · 0.85
AddWorkerFunction · 0.85
HelperMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…