MCPcopy
hub / github.com/grafana/dskit / executeScenario

Function executeScenario

ring/batch_test.go:61–80  ·  view source on GitHub ↗
(bt batchTracker, scenarios []scenario)

Source from the content-addressed store, hash-verified

59}
60
61func executeScenario(bt batchTracker, scenarios []scenario) error {
62 var wg sync.WaitGroup
63 wg.Add(len(scenarios))
64
65 go func() {
66 for _, sc := range scenarios {
67 bt.record(sc.itemTrackers, sc.err, isHTTPStatus4xx)
68 wg.Done()
69 }
70 }()
71
72 wg.Wait()
73
74 select {
75 case err := <-bt.err:
76 return err
77 case <-bt.done:
78 return nil
79 }
80}

Callers 1

TestBatchTracker_RecordFunction · 0.85

Calls 4

recordMethod · 0.80
AddMethod · 0.65
DoneMethod · 0.65
WaitMethod · 0.45

Tested by

no test coverage detected