MCPcopy Create free account
hub / github.com/cortexproject/cortex / setupFrontend

Function setupFrontend

pkg/frontend/v1/queue_test.go:25–36  ·  view source on GitHub ↗
(t *testing.T, maxOutstanding int, config Config)

Source from the content-addressed store, hash-verified

23)
24
25func setupFrontend(t *testing.T, maxOutstanding int, config Config) (*Frontend, error) {
26 logger := log.NewNopLogger()
27
28 limits := MockLimits{Queriers: 3, MockLimits: queue.MockLimits{MaxOutstanding: maxOutstanding}}
29 frontend, err := New(config, limits, logger, nil, transport.NewRetry(0, nil))
30 require.NoError(t, err)
31
32 t.Cleanup(func() {
33 require.NoError(t, services.StopAndAwaitTerminated(context.Background(), frontend))
34 })
35 return frontend, nil
36}
37
38func testReq(ctx context.Context, reqID, user string) *request {
39 return &request{

Callers 2

TestRoundRobinQueuesFunction · 0.70

Calls 3

NewRetryFunction · 0.92
StopAndAwaitTerminatedFunction · 0.92
NewFunction · 0.70

Tested by

no test coverage detected